optimization - Alternate JavaScript compression approach in r.js build -
I'm using r.js to create a production script for the requirement of JS application and I'm looking for a way I'm either using an alternative compression library or change the default used I have to remove the empty space, but to be similar to variable names.
I have a special requirement for maintaining variable names because they are and they have not been changed. Continuous variable names offer a little 'code odor' but it makes the configuration file of the application stronger against non-expert editors - so please try to avoid suggesting a design change here.
I currently have .js configured to not customize JavaScript at all, which means that there is not only the variable name but also the white space. The piece related to Gruntfile.js is given below.
Does anybody suggest that a RJS to be able to wait whitspace? Can not change variable name in build?
English: {baseUrl: "js", mainConfigFile: "js / app-en.js", name: "app-n", out: "js / dist / Lt;% = pkg.name% & gt; -JS ", customization:" none "}}
RJ Optimizer has settings that you can use to control how the minifier works. The default miner used is UglifyJS uglifyjs option r.js tells how to open it and eugelift: {no_mangle: true} < / Code> must be added: - AN JS", Eugly: {no_mangle: true},}} All done by Uglizhages The documents of the settings are documented. If you ever need to or have to switch or r.js have the uglify2 and shutdown settings that you want to set up their options For Uglify2, the setting to prevent mangling will be:
uglify2: {mangle: false} < P> Close: {COLLECTION LEVEL: 'WHITESPACE_ONLY',}, With the closure, I believe that you want: Html>
Comments
Post a Comment