I saw mishoo answered you
Two possible ways:
uglifyjs --selfto get a build of UglifyJS that you can load in a browser (or in any JS environment) and you can use the API described here.
- load in your environment all files in the lib/ directory (load
ast.jsfirst, the others can come in whatever order). If you do this, everything will be globalâ€”you can use the same API but there’s no need to prefix stuff with UglifyJS..
Also you might want to look at
tools/node.js to see how we load it in Node (as we’re not using the standard