Posted By

chrisaiv on 07/17/12



Versions (?)

NodeJS: Minimize all the JS files in a directory using Uglify-js

 / Published in: JavaScript

If you happen to have 5 or 6 javascript files that you'd like to compress into 1, then try uglify within terminal.

  1. //First download uglify-js. The -g params allows you to make command-line tools
  2. //sudo npm install -g uglify-js
  3. cat * | uglifyjs -o script.js

Report this snippet  

You need to login to post a comment.