eriwen/gradle-js-plugin — Issue #3: Feature Request: Environment switching
Author: chrisjaynes
Created: 2011-12-15 21:19:06+00:00
State: open

It would be great if this plugin could be used to provide an automated, build-time way to switch html back and forth between unminified dev versions and minified prod versions of JS files. This could be done by directly updating the HTML, but it might be nicer if it worked something like this:

* Html references a js file that is generated by the plugin
* When in DEV/UNMINIFIED mode, the generated js file uses Steal.js or Require.js (also configurable), to pull in dependencies as individual files
* When in PROD/MINIFIED mode, the the generated JS file could just be the minified js file itself
* A similar system could perhaps also be used to apply version numbers to the scheme?

Thanks for the cool plugins. I've just started using them, but so far they're a great solution to an annoying problem.