public JsValue ExportDefault(BaristaContext context, BaristaModuleRecord referencingModule) { var buffer = SerializedScriptService.GetSerializedScript(ResourceName, context, mapWindowToGlobal: true); var fnScript = context.ParseSerializedScript(buffer, () => EmbeddedResourceHelper.LoadResource(ResourceName), "[uuid]"); return(fnScript.Call <JsObject>()); }
public JsValue ExportDefault(BaristaContext context, BaristaModuleRecord referencingModule) { var buffer = SerializedScriptService.GetSerializedScript(ResourceName, context); var fnScript = context.ParseSerializedScript(buffer, () => EmbeddedResourceHelper.LoadResource(ResourceName), "[react-dom-server]"); var jsReact = fnScript.Call <JsObject>(); return(jsReact); }
/// <summary> /// returns a byte array consisting of a runtime-independent typescript compiler. /// </summary> /// <param name="context"></param> /// <returns></returns> public static byte[] GetSerializedTypeScriptCompiler(BaristaContext context) { if (context == null) { throw new ArgumentNullException(nameof(context)); } return(SerializedScriptService.GetSerializedScript(ResourceName, context)); }