Yeah. Cordova-common is the main reason for platforms. IMO It doesn't make sense to check it into platforms. It makes sense to have it as a bundleDependency but if you cordova platform add it via git url, the dependency won't be around. Hence the npm install On Oct 22, 2015 4:24 PM, "Darryl Pogue" <dar...@dpogue.ca> wrote:
> One example would be the ios-sim and ios-deploy node modules that the iOS > platform needs for launching the simulator and deploying to a device. > Currently these are bundled dependencies and checked in to git. > > Another example is the Platform API that's been added to cordova-android, > which depends on cordova-common. > > On 22 October 2015 at 16:17, Mefire O. <ommen...@microsoft.com> wrote: > > > 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 ? > > > > Thanks, > > Omar Mefire > > > > -----Original Message----- > > From: Steven Gill [mailto:stevengil...@gmail.com] > > Sent: Thursday, October 22, 2015 2:54 PM > > To: dev@cordova.apache.org > > 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 > > > https://na01.safelinks.protection.outlook.com/?url=https%3a%2f%2fgithub.com%2fapache%2fcordova-ios%60&data=01%7c01%7commenjik%40microsoft.com%7c8b52f2866d674b08c10b08d2db2b5347%7c72f988bf86f141af91ab2d7cd011db47%7c1&sdata=zdpqgA08JQxJ4h5DpWCpBiggl1RTZu%2fMN8gE%2fbXHPG8%3d > > > > 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? > > >