I agree with `create` as it applies to the entire platform. However, the project level scripts are potentially more volatile.
Shouldn't each project have a package.json which exports? my-project |-platforms |-ios |-package.json module.exports = { run:Function, build:Function, clean:Function, log:Function} Also, the key benefit of this move is just to move platform specific cli code into platform repos, so do we really need to change `run`? It is already completely decoupled. var cmd = path.join(projectRoot, 'platforms', platform, 'cordova', 'run'); So I completely support moving everything the parsers[1] do for each platform, but I am not sure on the project level scripts. Also I support moving everything that plugman relies on per platform into each platform. [2] [1] https://github.com/apache/cordova-lib/tree/master/cordova-lib/src/cordova/metadata [2] https://github.com/apache/cordova-lib/tree/master/cordova-lib/src/plugman/platforms @purplecabbage risingj.com On Tue, May 27, 2014 at 2:20 PM, Brian LeRoux <b...@brian.io> wrote: > We've discussed this but I'm not sure the whole idea has crystalized. My > proposal (based on previous discussions) below. I'll use iOS as an example > but this applies to all platforms supported by the CLI. > > First, we'd add two files: > > cordova-ios > |-package.json > '-index.js > > …I don't think I need to describe the utility of package.json but index.js > would expose programatic library apis: > > module.exports = { create:Function, run:Function, build:Function, > clean:Function, log:Function} > > We then publish to npm. That is it for now. Ideal future CLI uses platforms > just like other deps. We lose lazy loading but network and disk is cheap so > it wasn't really important anyhow. > > Discuss! >