Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Using uglifyjs with nodejs in windows

I installed nodejs from nodejs.org on my windows box.

The path to node is C:\Program Files (x86)\nodejs\node.exe

I can run node in command prompt correctly, my question is...I cloned uglifyjs to C:\gitrepos\uglifyjs\

Now I am trying to figure out how to get things setup to just run something like

node uglifyjs -o inputfile.min.js inputfile.js

What has to happen to allow me to do that?

like image 635
jcreamer898 Avatar asked Nov 22 '11 15:11

jcreamer898


People also ask

What is the use of UglifyJS?

UglifyJS is a JavaScript parser/compressor/beautifier toolkit. It can be used to combine and minify JavaScript assets so that they require less HTTP requests and make your site load faster.

Does Uglify support ES6?

uglify-es is no longer maintained and uglify-js does not support ES6+.


1 Answers

You can run it by :

node C:\gitrepos\uglifyjs\bin\uglifyjs -o inputfile.min.js inputfile.js
like image 120
pradeek Avatar answered Oct 27 '22 12:10

pradeek