0

I have many js and css files. Is there any simple utility to compile them into two files?

util --input_dir=js/ --output=build.js

util --input_dir=css/ --output=build.css

2 Answers 2

2

On linux you can use simple shell script https://github.com/dfsq/compressJS.sh to combine multiple javascript files into the single one. It makes use of the Closure Compiler online service so the resulting script is also effectively compressed.

$ ./compressJS.sh some-script.js another-sctipt.js onemore.js

You can also see: https://github.com/eloone/mergejs.

Second approach is to load them in parallel using: http://yepnopejs.com/ or http://headjs.com

Sign up to request clarification or add additional context in comments.

Comments

1

You can use gulp or grunt for that.

http://gulpjs.com

http://gruntjs.com

1 Comment

Or if you prefer an interface you can look up codekit or prepros. incident57.com/codekit prepros.io

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.