public final class ProcessCommonJSModules extends Object implements CompilerPass
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.
|
Modifier and Type | Method and Description |
---|---|
void |
process(Node externs,
Node root)
Process the JS with root node root.
|
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)
CompilerPass
process
in interface CompilerPass
externs
- Top of external JS treeroot
- Top of JS treeCopyright © 2009-2016 Google. All Rights Reserved.