public class RequireExpansionCompilerPass extends Object implements com.google.javascript.jscomp.CompilerPass
Constructor and Description |
---|
RequireExpansionCompilerPass(IAggregator aggregator,
Features features,
Set<String> dependentFeatures,
List<ModuleDeps> expandedDepsList,
org.apache.commons.lang3.mutable.MutableBoolean hasExpandableRequires,
boolean expandRequires,
String configVarName,
boolean logDebug,
JSSource source)
Constructs a instance of this class for a specific module that is being compiled.
|
Modifier and Type | Method and Description |
---|---|
void |
process(com.google.javascript.rhino.Node externs,
com.google.javascript.rhino.Node root) |
void |
processChildren(com.google.javascript.rhino.Node node,
List<DependencyList> enclosingDependencies)
Recursively called to process AST nodes looking for require calls.
|
public RequireExpansionCompilerPass(IAggregator aggregator, Features features, Set<String> dependentFeatures, List<ModuleDeps> expandedDepsList, org.apache.commons.lang3.mutable.MutableBoolean hasExpandableRequires, boolean expandRequires, String configVarName, boolean logDebug, JSSource source)
aggregator
- The aggregator objectfeatures
- The set of features specified in the requestdependentFeatures
- Output - the dependent features identified during the expansionexpandedDepsList
- Output - the list of expanded dependencieshasExpandableRequires
- Output - true if the module contains one or more expandable require callsexpandRequires
- true if require dependencies should be expandedconfigVarName
- the name of the loader config var (e.g. dojoConfig or require, etc.)logDebug
- true if debug logging to the browser console is enabledsource
- the source file to update if optimization is disabledpublic void process(com.google.javascript.rhino.Node externs, com.google.javascript.rhino.Node root)
process
in interface com.google.javascript.jscomp.CompilerPass
public void processChildren(com.google.javascript.rhino.Node node, List<DependencyList> enclosingDependencies) throws IOException
node
- The node being processedenclosingDependencies
- The set of dependencies specified by enclosing define or
require calls.IOException
Copyright © 2011-2015 IBM. All Rights Reserved.