cordova-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dmitry Blotsky <dblot...@microsoft.com>
Subject RE: [DISCUSS] cordova-serve
Date Fri, 29 May 2015 01:46:23 GMT
If we agree with the assumption made by NPM that one package lives in one repo, we should have
separate repos. If we forfeit the idea that there is a one-to-one relationship with a repo
and an NPM module (this decoupling being the better paradigm, in my personal opinion), we
can have a bunch of them live in cordova-lib and just install them by first cloning and then
installing by path.

Kindly,
Dmitry

-----Original Message-----
From: Steven Gill [mailto:stevengill97@gmail.com] 
Sent: Thursday, May 28, 2015 3:59 PM
To: dev@cordova.apache.org
Subject: Re: [DISCUSS] cordova-serve

I'm always in favor of not duplicating code.

As long as we don't break functionality, I say move forward.

In terms of setting it up, this might be a good time for us to try out our original plan with
cordova-lib, which was for that one repo to host multiple modules. Our original intention
to do this was so we didn't keep getting more and more repos.

cordova-lib has a sub-directory right now named cordova-lib where the cordova-lib npm module
lives. We could add new sub-directory named cordova-serve with its own package.json

Directory structure could look like:
|Cordova-lib
|---cordova-lib
|------package.json
|------cordova-lib files
|---cordova-serve
|------package.json
|------cordova-serve files
|---README.md
|---.travis.ym
|---etc

Testing:
Both modules would have to share the same appvoyer and travis files. This could be annoying.

Issue:
We have seen a issue where npm can't install subdirectories from git.
https://github.com/npm/npm/issues/2974. This might be a good reason not to have multiple npm
modules in one repo. It would only affect use cases where you are grabbing the modules from
git instead of npm.

Alternative:
request a new repo from infra for cordova-serve.

Since the module will live at Apache, we would have to vote on it like we do with all of our
other releases.




On Thu, May 28, 2015 at 9:00 AM, Tim Barham <Tim.Barham@microsoft.com>
wrote:

> A while back we duplicated a bunch of 'cordova serve' code in 
> cordova-browser so that 'cordova run browser' launched from a server 
> rather than the local file system. At the time, the desire was 
> expressed that ultimately we should avoid the duplicated code and have 
> a separate 'cordova-serve' module. Since this module would also be 
> useful for the plugin simulation stuff I've been working on, I've been 
> taking a look at it recently.
>
> I have an initial implementation [1], and also updates to 
> cordova-browser [2] and cordova-lib [3] that would make use of it.
>
> I have two questions:
>
> 1. Do we agree this is the right thing to do (cost of maintaining an 
> additional Cordova module versus the benefit)? It's certainly 
> something
> *I'd* like to have (for the plugin simulation stuff if nothing else :) ).
> 2. If the answer to question 1 is yes, how do I go about setting it up?
>
> [1] https://github.com/TimBarham/cordova-serve
> [2]
> https://github.com/MSOpenTech/cordova-lib/compare/bddcc8f2d709a55df2d9
> 1c14def61212843a14e8...tb-cordova-serve
> [3]
> https://github.com/MSOpenTech/cordova-browser/compare/42bd8f1985041ba2
> 6b33408372b218218f7c6183...tb-cordova-serve
>
> Thanks!
>
> Tim
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@cordova.apache.org
> For additional commands, e-mail: dev-help@cordova.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@cordova.apache.org
For additional commands, e-mail: dev-help@cordova.apache.org


Mime
View raw message