If people are into it, I can handle this one as I am very familiar with the code base since I just did it for the browserify workflow.
On Tue, May 26, 2015 at 4:15 PM, Steven Gill <stevengil...@gmail.com> wrote: > Hey Murat, > > By two files you mean cordova-js-src and www\cordova.js I assume. The > www\cordova.js file is generated and updated on each release of the > platform. It will use cordova-js-src to build it when available (instead of > legacy-exe version) > > Problem with removing www\cordova.js and building it on runtime is that we > loose support of platforms being able to build cordova projects > independently of cordova-cli. We would have to have cordova.js as a > dependency for each platform to be able to keep the ./bin/create scripts > still having access to a cordova.js file. > > Right now, the browserify way builds cordova.js at runtime with the CLI by > grabbing cordova-js-src from platform_www of added platforms or from > cordovajs/src/legacy-exec if cordova-js-src doesn't exist (older platforms) > . Because of this, we already have cordovajs as a dependency of > cordova-lib. So theoretically, we could build cordova.js at runtime for > non-browserify use case using a similar workflow. > > I think we should keep the www\cordova.js for now, and add non-browserify > runtime cordova.js generation behind a flag so we can test it out. I see > the value in it because we have use cases where we update the platform > specific JS (in cordova-js-src) but can't test without generating a new > cordova.js and moving it over to our platforms. > > Obviously using the --browserify flag will also work for you to be able to > test those platform specific changes. > > On Tue, May 26, 2015 at 3:31 PM, Murat Sutunc <mura...@microsoft.com> > wrote: > >> Hey there, >> I've a quick question. Now that every platform comes with cordova-js-src >> should we remove the www\cordova.js from platform repos? >> I think it's a better idea to compile cordova.js on first build if it's >> missing. This way we don't have to update two files when working on >> platform js. >> Thoughts? >> >> Thanks, >> Murat >> > >