cordova-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Steven Gill <>
Subject Re: Building cordova.js on first build
Date Tue, 26 May 2015 23:15:40 GMT
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 <> 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

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