Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Compress Javascript in Windows

Does anyone know any good links on how to minify/compress javascript files using YUI Compressor in Windows? I am trying to figure out how to get it installed, then compress javascript using the msdos command line.

Thanks!

like image 769
wayofthefuture Avatar asked Mar 28 '13 23:03

wayofthefuture


2 Answers

  1. Install Nodejs for Windows
  2. npm (node package manager) comes with the MSI you just grabbed and installed
  3. Run npm install yuicompressor
  4. Read the docs and compress files

I would recommend uglify-js over YUI Compressor since it is in a deprecation process. Same install as above.

like image 67
Jonas G. Drange Avatar answered Oct 23 '22 00:10

Jonas G. Drange


You could also use gruntjs with grunt-contrib-uglify.

like image 44
Corey Avatar answered Oct 22 '22 23:10

Corey