cordova-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Steven Gill <stevengil...@gmail.com>
Subject npm install on cordova platform/plugin add
Date Thu, 22 Oct 2015 21:53:33 GMT
We discussed running `npm install` on `cordova plugin add` at the Cordova
F2F.

I want to see how people feel about this.

For installing a platform via git url, the dependency won't exist unless we
check it in to the repo. This can cause problems. bundleDependencies are
only useful for installing via npm

For platforms:

i believe this is how it would work:

Adding via `npm`

1) `cordova platform add ios`

2) cordova fetches `cordova-ios` from npm, adds it to global cordova
directory

3) I'd like tools to run `npm install` , but these deps are most likely
already included in fetched version due to `bundleDependecies`. So it
wouldn't do anything

Adding locally

1) `cordova platform add /YourLocalCordovaIOS`

2) cordova uses your `cordova-ios`

3) tools to run `npm install` which should have no impact (Assuming you've
done it manually)

Adding via Git url

1) `cordova platform add https://github.com/apache/cordova-ios`

2) cordova clones it (i believe into global cordova directory)

3) tools to run `npm install` which is important because packages aren't
bundled unless we manually check them in

For Plugins
It would allow plugins to have 3rd party npm dependencies and not have to
check them in. This will be even more important once we switch to
browserify method.

Thoughts?

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message