Reference

@reckona/mreact-next

7 public exports.

Function

FunctioncompileMreactComponentModulefunction compileMreactComponentModule(code: string, filename: string, options: CompileMreactComponentModuleOptions): CompiledMreactComponentModuleCompiles one `.mreact.tsx` component module into wrapper and DOM module source code.FunctionformatGeneratedMreactComponentsfunction formatGeneratedMreactComponents(generated: readonly GeneratedMreactComponent[], rootDir: string): stringFormats generated component paths as a human-readable CLI summary.FunctiongenerateMreactComponentsfunction generateMreactComponents(options: GenerateMreactComponentsOptions): Promise<GeneratedMreactComponent[]>Generates wrapper and DOM modules for every `.mreact.tsx` component under a root directory.

Interface

InterfaceCompiledMreactComponentModuleinterface CompiledMreactComponentModuleContains the generated wrapper module code and browser DOM module code for a component file.InterfaceCompileMreactComponentModuleOptionsinterface CompileMreactComponentModuleOptionsConfigures the import path from the wrapper module to the generated DOM module.InterfaceGeneratedMreactComponentinterface GeneratedMreactComponentDescribes one source component and the wrapper and DOM modules generated for it.InterfaceGenerateMreactComponentsOptionsinterface GenerateMreactComponentsOptionsConfigures the root directory scanned for `.mreact.tsx` component files.