lasso-minify-inline-js
v0.1.0
Published
Lasso.js plugin to minify inline javascript
Downloads
3
Maintainers
Readme
lasso-minify-inline-js
Lasso.js plugin to minify inline javascript using UglifyJS.
Installation
npm install lasso-minify-inline-js --save
Motivation
In some cases it may be useful to only minify the inline resources. For example if your main resources are minified through some external process like a CDN, you may want to handle the inline resources separately. This serves as a simple solution to that problem (see https://github.com/lasso-js/lasso/issues/84).
Usage
This plugin can be included through Lasso configuration. You would normally only enable this plugin when the
default Lasso.js minifier is disabled, since otherwise both minification transforms will execute. UglifyJS options can be passed through config
.
The relevant portion of configuration should look something like this:
{
"plugins": [
{
"plugin": "lasso-minify-inline-js",
"config": {
"mangle": false
}
}
],
"minify": false
}