Package org.raptorjs.rhino.commonjs.module

Examples of org.raptorjs.rhino.commonjs.module.Require


        Context cx = Context.enter();
        injectDefineScript = new InjectDefineScript(this);
       
        ScriptableObject globalScope = this.getJavaScriptEngine().getGlobalScope();
        globalScope.put("global", globalScope, globalScope);
        Require require = this.createRequire(cx, globalScope);
        require.install(globalScope);
       
        this.raptor = (ScriptableObject) this.getJavaScriptEngine().invokeMethod(globalScope, "require", "raptor");
        injectDefineScript.setRaptor(raptor);
        this.resourceManager.addSearchPathEntry(new ClasspathSearchPathEntry(RaptorJSEnv.class, "/META-INF/resources"));
       
View Full Code Here


    {
      URI dirUri = this.getDirectory();
      Iterable<URI> uris = Collections.singleton(dirUri);
      UrlModuleSourceProvider urlModuleSourceProvider = new RaptorUrlModuleSourceProvider(uris, null);

      Require require = new RaptorRequire(
            cx,
            scope,
            urlModuleSourceProvider,
            this.injectDefineScript,
            null,
View Full Code Here

TOP

Related Classes of org.raptorjs.rhino.commonjs.module.Require

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.