cordova-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mefire O. <>
Subject RE: npm install on cordova platform/plugin add
Date Thu, 22 Oct 2015 23:17:40 GMT
I can definitely see the case for adding deps specified in plugins' package.json, which is
to make 'tools plugins' development easier.

But I don't understand the use case for platforms. What scenario are we trying to fulfill
there ?

Omar Mefire

-----Original Message-----
From: Steven Gill [] 
Sent: Thursday, October 22, 2015 2:54 PM
Subject: npm install on cordova platform/plugin add

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

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.

View raw message