Documentation
¶
Index ¶
- func BuildErrorPage(componentPath string, errorMessages []string) *Node
- func CommonJSComponentPage(c config.AppConfig, componentName, compiledJS string) *Node
- func CommonJSLoader(componentName, compiledJS string) *Node
- func ComponentErrorStyles() *Node
- func ComponentLoader(componentPath, componentName string, useModuleEndpoint bool) *Node
- func ComponentPageLayout(title string, children ...*Node) *Node
- func ComponentRuntimeStyles() *Node
- func ErrorDisplay(title, message string, details []string) *Node
- func LoadModule(componentPath, componentName string) *Node
- func New(d deps.Deps) *http.ServeMux
- func ReactComponentPage(c config.AppConfig, componentName string, additionalHeadNodes ...*Node) *Node
- func ReactImportMap(c config.AppConfig) *Node
- func ServeReactApp(w http.ResponseWriter, r *http.Request, componentPath, componentName string)
- type BuildCache
- type FileInfo
- type SaveFileRequest
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BuildErrorPage ¶
BuildErrorPage creates a complete error page for build failures
func CommonJSComponentPage ¶
CommonJSComponentPage creates a page that renders a React component using CommonJS/IIFE bundle
func CommonJSLoader ¶
func CommonJSLoader(componentName, compiledJS string) *Node
CommonJSLoader creates a script that loads and renders a bundled React component using CommonJS
func ComponentErrorStyles ¶
func ComponentErrorStyles() *Node
ComponentErrorStyles returns CSS styles for error displays
func ComponentLoader ¶
ComponentLoader creates the JavaScript module loader for a component
func ComponentPageLayout ¶
func ComponentPageLayout(title string, children ...*Node) *Node
ComponentPageLayout creates the standard layout for component pages
func ComponentRuntimeStyles ¶
func ComponentRuntimeStyles() *Node
ComponentRuntimeStyles returns CSS styles for component runtime
func ErrorDisplay ¶
ErrorDisplay creates an error display div
func LoadModule ¶
func LoadModule(componentPath, componentName string) *Node
LoadModule creates a script node that loads and renders a React component module componentPath: path to the component file (e.g., "claudemd/ClaudeDocApp.tsx") componentName: name of the component to render (e.g., "ClaudeDocApp")
func ReactComponentPage ¶
func ReactComponentPage(c config.AppConfig, componentName string, additionalHeadNodes ...*Node) *Node
ReactComponentPage creates a page that renders a React component
func ReactImportMap ¶
ReactImportMap returns a script tag with React import mappings
func ServeReactApp ¶
func ServeReactApp(w http.ResponseWriter, r *http.Request, componentPath, componentName string)
ServeReactApp serves a React application with the standard layout and dependencies This provides a reusable pattern for hosting React apps with esbuild compilation