Skip to content

Instantly share code, notes, and snippets.

@dgoguerra
Last active August 29, 2015 14:25
Show Gist options
  • Save dgoguerra/77074aeeb1c89211f7f2 to your computer and use it in GitHub Desktop.
Save dgoguerra/77074aeeb1c89211f7f2 to your computer and use it in GitHub Desktop.
Basic UglifyJS usage, installing it in a project (not globally)

Add UglifyJS to the project:

npm install --save-dev uglify-js

Run it through a source file, wich name mangling and compression:

node_modules/uglify-js/bin/uglifyjs input-file.js \
    -o build/output-file.min.js \
    -c -m
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment