我正在尝试运行此命令:
java -jar -XX:-TieredCompilation node_modules/google-closure-compiler/compiler.jar --flagfile="/tmp/499a750e-98bc-4afa-b333-fb08fa71351e" --js=/home/ubuntu/santa-tracker-web/components/closure-library/closure/goog/base.js --externs=node_modules/google-closure-compiler/contrib/externs/google_universal_analytics_api.js --compilation_level=ADVANCED_OPTIMIZATIONS --warning_level=VERBOSE --language_in=ECMASCRIPT6_STRICT --language_out=ECMASCRIPT5_STRICT --define=santaAPIRequest.BASE="https://santa-api.appspot.com/" --output_wrapper=(function(){%output%}).call(window); --rewrite_polyfills=false --generate_exports=true --export_local_property_definitions=true --jscomp_warning=accessControls --jscomp_warning=const --jscomp_warning=visibility --js_output_file="santa.min.js"
这实际上是来自 gulpfile 的错误,但我已将这个问题缩小到这一特定代码行here,它会产生上述问题。它抱怨语法 - 但在我看来,我无法理解似乎是什么问题。
提前致谢!
您必须使用引号来保护
function(){%output%}).call(window);
从外壳:
java -jar -XX:-TieredCompilation node_modules/google-closure-compiler/compiler.jar --flagfile="/tmp/499a750e-98bc-4afa-b333-fb08fa71351e" --js=/home/ubuntu/santa-tracker-web/components/closure-library/closure/goog/base.js --externs=node_modules/google-closure-compiler/contrib/externs/google_universal_analytics_api.js --compilation_level=ADVANCED_OPTIMIZATIONS --warning_level=VERBOSE --language_in=ECMASCRIPT6_STRICT --language_out=ECMASCRIPT5_STRICT --define=santaAPIRequest.BASE="https://santa-api.appspot.com/" --output_wrapper='(function(){%output%}).call(window);' --rewrite_polyfills=false --generate_exports=true --export_local_property_definitions=true --jscomp_warning=accessControls --jscomp_warning=const --jscomp_warning=visibility --js_output_file="santa.min.js"
本文收集自互联网,转载请注明来源。
如有侵权,请联系[email protected] 删除。
我来说两句