当我在Java中使用闭包编译器时。我使用此文档how to use "closure-compiler " inside the java。但是我无法理解 param:EXTERNS 。最后,我如何从String输入代码?
pom.xml
<dependency>
<groupId>com.google.javascript</groupId>
<artifactId>closure-compiler</artifactId>
<version>v20190929</version>
</dependency>
代码
Compiler compiler = new Compiler();
CompilerOptions options = new CompilerOptions();
CompilationLevel.ADVANCED_OPTIMIZATIONS.setOptionsForCompilationLevel(
options);
compiler.compile(source, options);