6

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!

2 Answers 2

10
  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.

Sign up to request clarification or add additional context in comments.

2 Comments

Before you responded, I managed to get it working. I just downloaded the yui jar file from github, then run java -jar yui.jar etc... Does this sound ok or should I do it the way you stated?
Choose whatever works for you. There are benefits using Node.js as the environment for things like these. Also, YUI Compressor has been, allegedly, abandoned by YUI. Updated my answer.
1

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

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.