libout

package
v0.21.0 Latest Latest
Warning

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

Go to latest
Published: Feb 21, 2023 License: GPL-3.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BundleGroup

type BundleGroup struct {
	*BundleGroupOpts
	// contains filtered or unexported fields
}

func New

func New(opts *BundleGroupOpts) *BundleGroup

func (*BundleGroup) AcceptComponent added in v0.3.6

func (l *BundleGroup) AcceptComponent(ctx context.Context, c srcpack.PackComponent, cacheOpts *webwrap.CacheDOMOpts) error

AcceptComponent collects the required DOM elements and applies it to the component body map

func (*BundleGroup) AcceptComponents

func (l *BundleGroup) AcceptComponents(ctx context.Context, comps []srcpack.PackComponent, cacheOpts *webwrap.CacheDOMOpts) error

AcceptComponents collects the required DOM elements and applies it to the component body map

func (*BundleGroup) WriteLibout

func (opts *BundleGroup) WriteLibout(files Libout, fOpts *FilePathOpts) error

type BundleGroupOpts

type BundleGroupOpts struct {
	PackageName   string
	BaseBundleOut string
	BundleMode    string
	PublicDir     string
	HotReloadPort int
}

type BundleWriter added in v0.3.6

type BundleWriter interface {
	WriteLibout(files Libout, fOpts *FilePathOpts) error
	AcceptComponent(ctx context.Context, c srcpack.PackComponent, cacheOpts *webwrap.CacheDOMOpts) error
	AcceptComponents(ctx context.Context, comps []srcpack.PackComponent, cacheOpts *webwrap.CacheDOMOpts) error
}

type FilePathOpts

type FilePathOpts struct {
	TestFile string
	HTTPFile string
	EnvFile  string
}

type GOLibFile

type GOLibFile struct {
	PackageName string
	Body        string
}

GOLibFile is an implementation of the libout.LiboutFile that represents a single golang generated file

func (*GOLibFile) Write

func (l *GOLibFile) Write(path string) error

Write writes the current golibfile to the provided path this function will also create the file, if it does not exist.

type GOLibout

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

GOLibOut is an implementation of the libout.Libout interface which is an auto generated set of files that represent some bundling process.

func (*GOLibout) EnvFile

func (l *GOLibout) EnvFile(bg *BundleGroup) (LiboutFile, error)

func (*GOLibout) HTTPFile

func (l *GOLibout) HTTPFile(packageName string) (LiboutFile, error)

func (*GOLibout) TestFile

func (l *GOLibout) TestFile(packageName string) (LiboutFile, error)

type Libout

type Libout interface {
	TestFile(packageName string) (LiboutFile, error)
	HTTPFile(packageName string) (LiboutFile, error)
	EnvFile(*BundleGroup) (LiboutFile, error)
}

Libout represents autogenerated output created by the compiler

func NewGOLibout

func NewGOLibout(testFile embedutils.FileReader, httpFile embedutils.FileReader) Libout

type LiboutFile

type LiboutFile interface {
	Write(path string) error
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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