首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >运行闭包编译器以获取警告消息

运行闭包编译器以获取警告消息
EN

Stack Overflow用户
提问于 2015-06-08 00:52:42
回答 2查看 320关注 0票数 0

我使用在本地机器上运行的Closure Compiler来生成客户端文件。我也在使用http://closure-compiler.appspot.com/home的在线闭包工具来检查我的工作:我粘贴我的JavaScript代码,按编译,如果有警告,编译器会向我显示实际行和行号的警告。

我想知道是否有可能使用Closure Compiler的本地版本获得相同的输出。这是我用来编译文件并获得编译后的JavaScript的代码,但这一次,我需要警告:

代码语言:javascript
复制
System.IO.File.WriteAllText(FileNameInput, TheJS);

string JavaArgument = "-jar ClosureCompiler/compiler.jar --js ClosureCompiler/initial" + FileNameSuffix + ".js --js_output_file ClosureCompiler/compiled" + FileNameSuffix + ".js --compilation_level ADVANCED_OPTIMIZATIONS --externs ExternalFiles/JqueryExtern.js";

System.Diagnostics.Process clientProcess = new System.Diagnostics.Process();

clientProcess.StartInfo.FileName = "java.exe";
clientProcess.StartInfo.Arguments = JavaArgument;
clientProcess.StartInfo.CreateNoWindow = true;
clientProcess.StartInfo.UseShellExecute = false;
clientProcess.StartInfo.WorkingDirectory = HttpRuntime.AppDomainAppPath;

clientProcess.Start();
clientProcess.WaitForExit();

string TheOutputScript = System.IO.File.ReadAllText(FileNameOutput);

我需要改变什么?

EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/30696081

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档