Skip to content

Instantly share code, notes, and snippets.

@tmpvar
Last active August 29, 2015 14:20
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tmpvar/61941f90852444eb5a11 to your computer and use it in GitHub Desktop.
Save tmpvar/61941f90852444eb5a11 to your computer and use it in GitHub Desktop.
run locally installed things with `npm run`
node_modules

First, clone this gist somewhere and cd into 61941f90852444eb5a11

61941f90852444eb5a11 (master)‣ npm install
npm WARN package.json my-application@ No description
npm WARN package.json my-application@ No repository field.
npm WARN package.json my-application@ No README data
uglifyjs@2.4.10 node_modules/uglifyjs
├── uglify-to-browserify@1.0.2
├── async@0.2.10
├── yargs@1.3.3
└── source-map@0.1.34 (amdefine@0.1.0)
61941f90852444eb5a11 (master)‣ npm run ugly

> my-application@ ugly /Users/tmpvar/work/js/tmp/61941f90852444eb5a11
> uglifyjs --help

/Users/tmpvar/work/js/tmp/61941f90852444eb5a11/node_modules/.bin/uglifyjs input1.js [input2.js ...] [options]
Use a single dash to read input from the standard input.

NOTE: by default there is no mangling/compression.
Without [options] it will simply parse input files and dump the AST
with whitespace and comments discarded.  To achieve compression and
{
"name": "my-application",
"scripts": {
"ugly": "uglifyjs --help"
},
"dependencies": {
"uglifyjs": "^2.4.10"
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment