Class TransformAMDToCJSModule

  • All Implemented Interfaces:
    CompilerPass

    public final class TransformAMDToCJSModule
    extends java.lang.Object
    implements CompilerPass
    Rewrites an AMD module https://github.com/amdjs/amdjs-api/wiki/AMD to a CommonJS module. See ProcessCommonJSModules for follow up processing step.
    • Constructor Detail

      • TransformAMDToCJSModule

        public TransformAMDToCJSModule​(AbstractCompiler compiler)
    • Method Detail

      • process

        public void process​(Node externs,
                            Node root)
        Description copied from interface: CompilerPass
        Process the JS with root node root. Can modify the contents of each Node tree
        Specified by:
        process in interface CompilerPass
        Parameters:
        externs - Top of external JS tree
        root - Top of JS tree