public class ProcessCommonJSModules extends Object implements CompilerPass
Modifier and Type | Field and Description |
---|---|
static String |
DEFAULT_FILENAME_PREFIX |
Modifier and Type | Method and Description |
---|---|
void |
process(Node externs,
Node root)
Process the JS with root node root.
|
static String |
toModuleName(String filename)
Turns a filename into a JS identifier that is used for moduleNames in
rewritten code.
|
static String |
toModuleName(String requiredFilename,
String currentFilename)
Turn a filename into a moduleName with support for relative addressing
with ./ and ../ based on currentFilename;
|
public static final String DEFAULT_FILENAME_PREFIX
public void process(Node externs, Node root)
CompilerPass
process
in interface CompilerPass
externs
- Top of external JS treeroot
- Top of JS treepublic static String toModuleName(String filename)