dom

package
v0.0.6 Latest Latest
Warning

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

Go to latest
Published: Apr 29, 2022 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NodeModules

func NodeModules(module *gomod.Module) overlay.FileServer

Serve node_modules TODO: migrate to it's own package

Types

type Compiler

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

func New

func New(module *gomod.Module, transformer transform.Transformer) *Compiler

func (*Compiler) Compile

func (c *Compiler) Compile(ctx context.Context, fsys fs.FS) ([]esbuild.OutputFile, error)

Compile into a list of views for embedding

func (*Compiler) GenerateDir

func (c *Compiler) GenerateDir(ctx context.Context, fsys overlay.F, dir *overlay.Dir) error

GenerateDir generates a directory of compiled files

func (*Compiler) ServeFile

func (c *Compiler) ServeFile(ctx context.Context, fsys overlay.F, file *overlay.File) error

Serve a single file, used in development

Jump to

Keyboard shortcuts

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