views:

39

answers:

3

Hi everyone,

I would like to Compress all my file .js in a same directory in one file with Google Closure Compiler in a command line. For one file it's : java -jar compiler.jar --js test.js --js_output_file final.js

But I didn't find in the doc how put my other file at the end of final.js without write over the last compress file ? I would like something like that : java -jar compiler.jar --js --option *.js --js_output_file final.js

It's possible or must I do a programm who add all file in a file and after compress it ? Thank you if you can help me !

+1  A: 
java -jar path/to/closure-compiler/build/compiler.jar \ 
--js input_one.js \ 
--js input_two.js \ 
... \ 
--js_output_file compiled_output.js 
Orbit
A: 

ok thanks it's works very well :)

And do you know if there is an option who list each file .js and add it automatically or must I write each file manually or do a programm who will list each file .js ?

j3j3
please use the comment feature to add comments to an answer. (and delete this answer)
scunliffe
A: 

finally i did a function in php to list each file But I would like to know if it's possible to use Google CLosure Compiler with CSS in a command line ? Or is there another compiler who can make it in a commande line ?

j3j3
I use YUIcompressor ! Thanks for your help
j3j3