You can compress or minify your Javascript / jQuery code by visiting to resources which is available but if you want to use it on your localhost so you can use it and run like below on windows.
- 1. Installed Node.js
- 2. Set envirnment variable
- NODE_PATH
- C:\Program Files\nodejs\UglifyJS\bin\uglify;C:\Program Files\nodejs\node.exe;
- 3. Download uglify master from gits and put in folder
- C:\Program Files\nodejs\uglifyjs
- 4. run command
- Run npm -g install uglify-js
- final if you want to minify js
- 5. Run uglifyjs -o app.min.js app.js
Note: app.min.js is your name and app.js is your source js which you want to compress OR minify.
No comments:
New comments are not allowed.