ssr

package module
v0.0.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 2, 2026 License: MIT Imports: 20 Imported by: 0

README

ssr

SSR asset extractor for TinyWasm: runs components Render methods and collects CSS/JS/HTML/SVG for assetmin

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GenerateExtractorMain added in v0.0.2

func GenerateExtractorMain(outputFile string, modules []module) error

GenerateExtractorMain writes a main.go file that imports all modules and collects their assets.

Types

type Extractor added in v0.0.2

type Extractor struct {
	// contains filtered or unexported fields
}

func New

func New(rootDir string) *Extractor

func (*Extractor) ExtractAll added in v0.0.2

func (e *Extractor) ExtractAll() ([]*assetmin.SSRAssets, error)

func (*Extractor) ExtractModule added in v0.0.2

func (e *Extractor) ExtractModule(moduleDir string) (*assetmin.SSRAssets, error)

func (*Extractor) SetListModulesFn added in v0.0.2

func (e *Extractor) SetListModulesFn(fn func(string) ([]string, error))

func (*Extractor) SetLog added in v0.0.2

func (e *Extractor) SetLog(fn func(...any))

type ScriptOutput added in v0.0.2

type ScriptOutput struct {
	Name    string `json:"name"`
	Content string `json:"content"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL