New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

rollup-plugin-uglify

Package Overview
Dependencies
Maintainers
1
Versions
18
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

rollup-plugin-uglify - npm Package Compare versions

Comparing version 0.3.1 to 1.0.0

dist/rollup-plugin-uglify.js

25

package.json
{
"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)
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc