uglifyjs-browser
v3.0.0
Published
> UglifyJS@v3 packaged for the browser.
Downloads
847
Readme
uglifyjs-browser
UglifyJS@v3 packaged for the browser.
Why?
I spent far too much time digging for this and just need something to minify javascript within a browser app. This module does exactly that.
Versioning Notice
Starting at v3, this package will mirror the major version of our underlying UglifyJS dependency. For example, v3.0.0
will use UglifyJS v3.X.X
.
Example
const uglify = require('uglifyjs-browser')
const src = `
(function () {
var foo = 'bar'
var baz = 'qux'
this.foo = foo + baz
})()
`
const { code, error } = uglify.minify(src)
if (error) {
throw error
}
console.log(code)
Updating the build
Run the following, then push a new tag:
yarn upgrade uglify-js
yarn build
vim package.json # bump version
git release <version>
CircleCI will handle publishing to npm.
License
MIT