Google闭包——处理jquery原语问题(使用jquery导入)
我正试图用我的脚本的其余部分使jQuery由googleclosure正确编译 下面是我在编译器中使用的命令行:Google闭包——处理jquery原语问题(使用jquery导入),jquery,google-closure-compiler,google-closure,google-closure-library,Jquery,Google Closure Compiler,Google Closure,Google Closure Library,我正试图用我的脚本的其余部分使jQuery由googleclosure正确编译 下面是我在编译器中使用的命令行: java -jar /my/path/to/compiler.jar --compilation_level ADVANCED_OPTIMIZATIONS --generate_exports --js /srv/www/path/source/d8e44b35ea72f2e71350f2e87f7c6ab2.js --js_output_file /srv/www/path/d8
java -jar /my/path/to/compiler.jar --compilation_level ADVANCED_OPTIMIZATIONS --generate_exports --js /srv/www/path/source/d8e44b35ea72f2e71350f2e87f7c6ab2.js --js_output_file /srv/www/path/d8e44b35ea72f2e71350f2e87f7c6ab2.js --externs /My/path/to/jquery.js --process_jquery_primitives
编译器给出的信息对我来说似乎不是很清楚:
com.google.javascript.jscomp.CompilerOptionsPreprocessor$InvalidOptionsException: The jQuery pass and the Closure pass cannot both be enabled.
at com.google.javascript.jscomp.CompilerOptionsPreprocessor.preprocess(CompilerOptionsPreprocessor.java:80)
at com.google.javascript.jscomp.Compiler.compileInternal(Compiler.java:744)
at com.google.javascript.jscomp.Compiler.access$000(Compiler.java:94)
at com.google.javascript.jscomp.Compiler$3.call(Compiler.java:657)
at com.google.javascript.jscomp.Compiler$3.call(Compiler.java:654)
at com.google.javascript.jscomp.Compiler$4.call(Compiler.java:701)
at java.util.concurrent.FutureTask.run(FutureTask.java:262)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:745)
在这个问题上,我没有找到任何帮助。
有人可以帮忙吗?在我的情况下,降级关闭编译器jar可以解决这个问题,我的具体版本如下:
Closure Compiler (http://code.google.com/closure/compiler)
Version: v20131014-36-g579770a
Built on: 2013/10/31 17:14
可能重复的