You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Jul 17, 2022. It is now read-only.
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.
The text was updated successfully, but these errors were encountered:
I've been thinking about how to use properties to do this. How it'd work is you'd invoke gradle -Penv=dev taskName which would default to the DEV environment. That work for you?
I think that'd work. I wonder if the simple name 'env' wouldn't eventually
collide with other plugins? Should it maybe be 'jsenv' and 'cssenv'
instead?
It might also be nice to have some sort of cascading overrides. So it'd
default to dev, but you can override it either in the gradle script, or if
you pass in the script property, that'll override both. That way teams
have the option of picking their own "default" value for each script.
Also, if you have multiple js files, you might want some to always remain
uncompressed, unminified, etc. I guess in that case, you might not want to
override the value in the script.
I've been thinking about how to use properties to do this. How it'd work
is you'd invoke gradle -Penv=dev taskName which would default to the DEV
environment. That work for you?
Reply to this email directly or view it on GitHub: #3 (comment)
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:
Thanks for the cool plugins. I've just started using them, but so far they're a great solution to an annoying problem.
The text was updated successfully, but these errors were encountered: