在一个文件中使用Google Closure Compiler应用程序压缩所有文件.js [英] Compress all file .js with Google Closure Compiler Application in one File

查看:439
本文介绍了在一个文件中使用Google Closure Compiler应用程序压缩所有文件.js的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想在命令行中使用Google Closure Compiler在一个文件中的同一目录中压缩我的所有文件 .js

I would like to Compress all my file .js in a same directory in one file with Google Closure Compiler in a command line.

对于一个文件,它是:

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 ?

我想要这样的东西:

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 !

推荐答案

java -jar path/to/closure-compiler/build/compiler.jar \ 
--js input_one.js \ 
--js input_two.js \ 
... \ 
--js_output_file compiled_output.js 

这篇关于在一个文件中使用Google Closure Compiler应用程序压缩所有文件.js的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆