ssr

package module
v0.0.3 Latest Latest
Warning

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

Go to latest
Published: Jun 11, 2026 License: MIT Imports: 21 Imported by: 0

README

ssr

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

Module discovery is delegated to modfind, ensuring shared and cached module lookups across TinyWasm tools.

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) SetFinder added in v0.0.3

func (e *Extractor) SetFinder(f *modfind.Finder)

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