I'm using UglifyJS to minify my JavaScript files. It's working well with one file at a time. What I'm looking for is to minify all the JavaScript files present in a folder called JS into a folder called JSM.
To be clear, I have two files inside my JS folder called test1.js and test2.js, and I want to run uglify_ against that folder and generate files test1.min.js and test2.min.js inside the JSM folder, so is there a way to do this? A command like:
uglifyjs -c -m JS/*.js JSM/*.min.js
Or any idea that can help me.