IJsEngine GetJSEnviroment() { if (_engine != null) { return(_engine); } var engine = _toolsDir.CreateJsEngine(); var assembly = typeof(BundlerImpl).Assembly; engine.ExecuteResource("Lib.Bundler.Js.uglify.js", assembly); engine.EmbedHostObject("bb", _bbCallbacks); engine.ExecuteResource("Lib.Bundler.Js.bundler.js", assembly); _engine = engine; return(engine); }
IJsEngine getJSEnviroment() { if (_engine != null) { return(_engine); } var engine = _toolsDir.CreateJsEngine(); engine.EmbedHostObject("bb", _callbacks); var assembly = typeof(CssProcessor).Assembly; engine.ExecuteResource("Lib.CSSProcessor.bundle.min.js", assembly); engine.ExecuteResource("Lib.CSSProcessor.bbcss.js", assembly); _engine = engine; return(engine); }
IJsEngine getJSEnviroment() { if (_engine != null) { return(_engine); } var engine = _toolsDir.CreateJsEngine(); engine.Execute(_toolsDir.TypeScriptJsContent, _toolsDir.TypeScriptLibDir + "/typescript.js"); engine.EmbedHostObject("bb", _callbacks); var assembly = typeof(TsCompiler).Assembly; engine.ExecuteResource("Lib.TSCompiler.bbtsc.js", assembly); engine.SetVariableValue("bbDefaultLibLocation", _toolsDir.TypeScriptLibDir); _engine = engine; return(engine); }