public final class ProcessCommonJSModules extends Object implements CompilerPass
Modifier and Type | Field and Description |
---|---|
static DiagnosticType |
COMMON_JS_MODULE_LOAD_ERROR |
static DiagnosticType |
SUSPICIOUS_EXPORTS_ASSIGNMENT |
static DiagnosticType |
UNKNOWN_REQUIRE_ENSURE |
Constructor and Description |
---|
ProcessCommonJSModules(Compiler compiler)
Creates a new ProcessCommonJSModules instance which can be used to
rewrite CommonJS modules to a concatenable form.
|
ProcessCommonJSModules(Compiler compiler,
boolean reportDependencies)
Creates a new ProcessCommonJSModules instance which can be used to
rewrite CommonJS modules to a concatenable form.
|
public static final DiagnosticType COMMON_JS_MODULE_LOAD_ERROR
public static final DiagnosticType UNKNOWN_REQUIRE_ENSURE
public static final DiagnosticType SUSPICIOUS_EXPORTS_ASSIGNMENT
public ProcessCommonJSModules(Compiler compiler)
compiler
- The compilerpublic ProcessCommonJSModules(Compiler compiler, boolean reportDependencies)
compiler
- The compilerreportDependencies
- Whether the rewriter should report dependency
information to the Closure dependency manager. This needs to be true
if we want to sort CommonJS module inputs correctly. Note that goog.provide
and goog.require calls will still be generated if this argument is
false.public void process(Node externs, Node root)
process
in interface CompilerPass
externs
- Top of external JS treeroot
- Top of JS treeCopyright © 2009-2016 Google. All Rights Reserved.