我使用在本地机器上运行的Closure Compiler来生成客户端文件。我也在使用http://closure-compiler.appspot.com/home的在线闭包工具来检查我的工作:我粘贴我的JavaScript代码,按编译,如果有警告,编译器会向我显示实际行和行号的警告。
我想知道是否有可能使用Closure Compiler的本地版本获得相同的输出。这是我用来编译文件并获得编译后的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);我需要改变什么?
https://stackoverflow.com/questions/30696081
复制相似问题