webwrap

package
v0.3.6 Latest Latest
Warning

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

Go to latest
Published: Mar 20, 2022 License: GPL-3.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrComponentExport = errors.New("prefer capitalization for jsx components")
View Source
var ErrInvalidComponent = errors.New("invalid jsx component")

Functions

This section is empty.

Types

type BaseWebWrapper

type BaseWebWrapper struct {
	WebDir string
}

type CacheDOMOpts

type CacheDOMOpts struct {
	CacheDir  string
	WebPrefix string
}

func (*CacheDOMOpts) CacheWebRequest

func (c *CacheDOMOpts) CacheWebRequest(uris []string) ([]string, error)

type JSWebWrapper

type JSWebWrapper interface {
	Apply(jsparse.JSDocument) (jsparse.JSDocument, error)
	NodeDependencies() map[string]string
	DoesSatisfyConstraints(string) bool
	Version() string
	RequiredBodyDOMElements(context.Context, *CacheDOMOpts) []string
}

type JSWebWrapperList

type JSWebWrapperList []JSWebWrapper

func NewActiveMap

func NewActiveMap() JSWebWrapperList

func (*JSWebWrapperList) FirstMatch

func (j *JSWebWrapperList) FirstMatch(fileExtension string) JSWebWrapper

FirstMatch finds the first js web wrapper in the currently list that satisfies the file extension constraints

type ReactWebWrapper

type ReactWebWrapper struct {
	*BaseWebWrapper
}

func (*ReactWebWrapper) Apply

func (*ReactWebWrapper) DoesSatisfyConstraints

func (s *ReactWebWrapper) DoesSatisfyConstraints(fileExtension string) bool

func (*ReactWebWrapper) NodeDependencies

func (s *ReactWebWrapper) NodeDependencies() map[string]string

func (*ReactWebWrapper) RequiredBodyDOMElements

func (s *ReactWebWrapper) RequiredBodyDOMElements(ctx context.Context, cache *CacheDOMOpts) []string

func (*ReactWebWrapper) Version

func (s *ReactWebWrapper) Version() string

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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