bundler

package
v0.0.0-...-4162cc6 Latest Latest
Warning

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

Go to latest
Published: Oct 27, 2024 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Bundle

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

func (*Bundle) Files

func (bun *Bundle) Files() []string

Files lists the output file paths in the Bundle.

func (*Bundle) StoreInDir

func (bun *Bundle) StoreInDir(dir string) error

StoreInDir compiles all files in the Bundle to the given output directory.

func (*Bundle) WriteFileTo

func (bun *Bundle) WriteFileTo(pth string, w io.Writer) error

WriteFileTo compiles the file stored at pth and writes the output to w.

type Bundler

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

func NewBundler

func NewBundler() *Bundler

func (*Bundler) Add

func (b *Bundler) Add(h Handler)

func (*Bundler) Compile

func (b *Bundler) Compile() (*Bundle, error)

type FsFileHandler

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

func NewFsFileHandler

func NewFsFileHandler(fs fs.FS, src, dest string) *FsFileHandler

func (*FsFileHandler) Files

func (h *FsFileHandler) Files() ([]string, error)

func (*FsFileHandler) Handle

func (h *FsFileHandler) Handle(w io.Writer, file string) error

type FsGlobHandler

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

func NewFsDirHandler

func NewFsDirHandler(fs fs.FS, srcDir, dstDir string) *FsGlobHandler

func NewFsGlobHandler

func NewFsGlobHandler(fs fs.FS, srcDir, glob, dstDir string) *FsGlobHandler

func (*FsGlobHandler) Files

func (h *FsGlobHandler) Files() ([]string, error)

func (*FsGlobHandler) Handle

func (h *FsGlobHandler) Handle(w io.Writer, file string) error

type Handler

type Handler interface {
	Files() ([]string, error)
	Handle(w io.Writer, file string) error
}

Jump to

Keyboard shortcuts

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