how to minify multiple javascript files using yuicompressor node module

prerequisites

  1. install node js and npm
  2. install yuicompressor using the command npm install yuicompressor

A short tutorial on, how to use yuicompressor is available on https://www.npmjs.com/package/yuicompressor

Here is a small javascript program which helps you to compress multiple files.

  1.  Save  the above code as minify.js
  2. goto command prompt, goto the path where this file is saved and run the command node minify.js

Leave a Reply

Your email address will not be published. Required fields are marked *