1.1.25 • Published 7 years ago
atma-io-middleware-uglify v1.1.25
UglifyJS (Atma Plugin)
The Plugin extends:
atma-iowith a custom middleware to write minified JavaScript to filesAtma Toolkitwith auglifyaction
How to use
Embed into the Project
atma plugin install atma-io-middleware-uglifyThis adds `atma-loader-babel` npm dependency and the `package.json` would look like:{ "devDependencies": { "atma-io-middleware-uglify" }, "atma": { "plugins": [ "atma-io-middleware-uglify" ], "settings": { "atma-io-middleware-uglify": { "minify" : true, "defines": {} // override const variables, "uglify": {} // override uglify js options } } } }Extend your
build.jsfilemodule.exports = { // other actions 'compress': { action: 'atma-io-middleware-uglify', files: [ 'source/lib.js' ], output: 'release/', // optionaly, define constants for the UglifyJS compressor defines: { DEBUG: false, SAFE: true, BROWSER: true, NODE: false } } }Run
$ atma compress
The MIT License