uglify-my-js
v1.2.0
Published
Simple cli tool to minify javascript a file
Downloads
47
Maintainers
Readme
uglify-my-js
A simple cli tool to minify single javascript file
Installation
npm i uglify-my-js@latest
Requires Node.js v10+ to run.
Usage
Output file is generated in the current directory. It will contain minified file and source-map.
Other helpful commands
> uglifymyjs —help
> uglifymyjs —version
Usage Example
See Sample.
Dependency
The tool is built on top of uglifyjs-webpack-plugin
. Following is the fixed configuration currently it is using. Feel free add new issues if you want any customization.
{
cache: false,
parallel: true,
uglifyOptions: {
compress: {
drop_console: true,
warnings: false,
},
toplevel: true,
keep_classnames: undefined,
keep_fnames: false,
nameCache: null,
output: {
beautify: false,
comments: false,
},
compress: true,
ecma: 6,
mangle: true,
},
sourceMap: true,
}
Contributing
This library is designed to support JS files - i you want to add a new language support, we'd love you to contribute them here.
Please see Coding Guidelines when writing your PRs.
File issues in the Issues tab in GitHub