rollup-plugin-uglify
Advanced tools
Comparing version 0.3.1 to 1.0.0
{ | ||
"name": "rollup-plugin-uglify", | ||
"version": "0.3.1", | ||
"version": "1.0.0", | ||
"description": "Rollup plugin to minify generated bundle", | ||
"main": "dist/index.js", | ||
"main": "dist/rollup-plugin-uglify.js", | ||
"jsnext:main": "dist/rollup-plugin-uglify.mjs", | ||
"files": [ | ||
"src", | ||
"dist" | ||
], | ||
"scripts": { | ||
"pretest": "rollup -c", | ||
"test": "ava", | ||
"posttest": "eslint src test/*.js", | ||
"build": "rollup -c", | ||
"pretest": "npm run build", | ||
"test": "mocha test/*.js --compilers js:buble/register", | ||
"prepublish": "npm test" | ||
}, | ||
"eslintConfig": { | ||
"extends": "postcss" | ||
}, | ||
"repository": { | ||
@@ -39,9 +36,7 @@ "type": "git", | ||
"devDependencies": { | ||
"ava": "^0.11.0", | ||
"babel-preset-es2015-rollup": "^1.1.1", | ||
"eslint": "^2.0.0", | ||
"eslint-config-postcss": "^2.0.0", | ||
"rollup": "^0.25.3", | ||
"rollup-plugin-babel": "^2.3.9" | ||
"buble": "^0.10.6", | ||
"mocha": "^2.5.3", | ||
"rollup": "^0.31.1", | ||
"rollup-plugin-buble": "^0.10.0" | ||
} | ||
} |
@@ -44,4 +44,25 @@ # rollup-plugin-uglify [![Travis Build Status][travis-img]][travis] | ||
## Examples | ||
### Comments | ||
If you'd like to preserve comments (for licensing for example), then you can specify a function to do this like so: | ||
```js | ||
uglify({ | ||
output: { | ||
comments: function(node, comment) { | ||
var text = comment.value; | ||
var type = comment.type; | ||
if (type == "comment2") { | ||
// multiline comment | ||
return /@preserve|@license|@cc_on/i.test(test); | ||
} | ||
} | ||
} | ||
}); | ||
``` | ||
# License | ||
MIT © [Bogdan Chadkin](mailto:trysound@yandex.ru) |
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
5429
4
48
0
68