Uglify directory

Mark picture Mark · Mar 18, 2011 · Viewed 8k times · Source

Rather than adding code and files to the uglify script individually, is there any way to tell uglify to grab an entire dir, and output into 1 script.js file?

Answer

adamse picture adamse · Mar 18, 2011
cat * | uglifyjs -o script.js

If by uglifyjs you mean https://github.com/mishoo/UglifyJS this works! Without an input file uglifyjs will read from STDIN.