Documentation ¶
Index ¶
- Constants
- Variables
- type BaseBundler
- type BaseWebWrapper
- type BundleConfigurator
- type BundleOpts
- type BundledResource
- type BundlerKey
- type BundlerMode
- type CacheDOMOpts
- type JSWebWrapper
- type JSWebWrapperList
- type JavascriptWrap
- func (s *JavascriptWrap) Apply(page jsparse.JSDocument) (map[string]jsparse.JSDocument, error)
- func (b *JavascriptWrap) Bundle(configuratorFilePath string, filePath string) error
- func (s *JavascriptWrap) DoesSatisfyConstraints(page jsparse.JSDocument) bool
- func (b *JavascriptWrap) HydrationFile() []embedutils.FileReader
- func (s *JavascriptWrap) RequiredBodyDOMElements(ctx context.Context, cache *CacheDOMOpts) []string
- func (b *JavascriptWrap) Setup(ctx context.Context, settings *BundleOpts) (*BundledResource, error)
- func (s *JavascriptWrap) Stats() *WrapStats
- func (b *JavascriptWrap) VerifyRequirements() error
- func (s *JavascriptWrap) Version() string
- type NewReactSSROpts
- type PartialWrapReactSSR
- type ReactCSR
- func (s *ReactCSR) Apply(page jsparse.JSDocument) (map[string]jsparse.JSDocument, error)
- func (b *ReactCSR) Bundle(configuratorFilePath string, filePath string) error
- func (b *ReactCSR) DoesSatisfyConstraints(page jsparse.JSDocument) bool
- func (b *ReactCSR) HydrationFile() []embedutils.FileReader
- func (s *ReactCSR) RequiredBodyDOMElements(ctx context.Context, cache *CacheDOMOpts) []string
- func (b *ReactCSR) Setup(ctx context.Context, settings *BundleOpts) (*BundledResource, error)
- func (s *ReactCSR) Stats() *WrapStats
- func (r *ReactCSR) VerifyRequirements() error
- func (s *ReactCSR) Version() string
- type ReactHydrate
- func (s *ReactHydrate) Apply(page jsparse.JSDocument) (map[string]jsparse.JSDocument, error)
- func (b *ReactHydrate) Bundle(configuratorFilePath string, filePath string) error
- func (b *ReactHydrate) DoesSatisfyConstraints(page jsparse.JSDocument) bool
- func (b *ReactHydrate) HydrationFile() []embedutils.FileReader
- func (s *ReactHydrate) RequiredBodyDOMElements(ctx context.Context, cache *CacheDOMOpts) []string
- func (b *ReactHydrate) Setup(ctx context.Context, settings *BundleOpts) (*BundledResource, error)
- func (s *ReactHydrate) Stats() *WrapStats
- func (r *ReactHydrate) VerifyRequirements() error
- func (s *ReactHydrate) Version() string
- type WrapStats
Constants ¶
View Source
const (
BundlerModeKey string = "bundler-mode"
)
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 BaseBundler ¶ added in v0.7.0
type BaseWebWrapper ¶
type BaseWebWrapper struct {
WebDir string
}
type BundleConfigurator ¶ added in v0.16.0
type BundleConfigurator struct { // ConfiguratorPage represents a bundler setup file Page jsparse.JSDocument FilePath string }
type BundleOpts ¶ added in v0.7.0
type BundledResource ¶ added in v0.7.0
type BundledResource struct { Configurators []BundleConfigurator BundleOpFileDescriptor map[string]string }
type BundlerKey ¶ added in v0.7.0
type BundlerKey string
const (
BundlerID BundlerKey = "bundlerID"
)
type BundlerMode ¶ added in v0.7.0
type BundlerMode string
const ( ProductionBundle BundlerMode = "production" DevelopmentBundle BundlerMode = "development" )
type CacheDOMOpts ¶
func (*CacheDOMOpts) CacheWebRequest ¶
func (c *CacheDOMOpts) CacheWebRequest(uris []string) ([]string, error)
type JSWebWrapper ¶
type JSWebWrapper interface { Apply(jsparse.JSDocument) (map[string]jsparse.JSDocument, error) Bundle(configuratorFile string, originalFilePath string) error DoesSatisfyConstraints(jsparse.JSDocument) bool RequiredBodyDOMElements(context.Context, *CacheDOMOpts) []string HydrationFile() []embedutils.FileReader Setup(context.Context, *BundleOpts) (*BundledResource, error) Stats() *WrapStats VerifyRequirements() error Version() string }
func NewReactHydrate ¶ added in v0.21.0
func NewReactHydrate(bundler *BaseBundler) JSWebWrapper
type JSWebWrapperList ¶
type JSWebWrapperList []JSWebWrapper
func NewActiveMap ¶
func NewActiveMap(bundler *BaseBundler) JSWebWrapperList
func (JSWebWrapperList) FindFirst ¶ added in v0.21.0
func (j JSWebWrapperList) FindFirst(page jsparse.JSDocument) JSWebWrapper
func (JSWebWrapperList) VerifyAll ¶ added in v0.10.0
func (l JSWebWrapperList) VerifyAll() error
type JavascriptWrap ¶ added in v0.21.0
type JavascriptWrap struct { *BaseWebWrapper *BaseBundler }
func (*JavascriptWrap) Apply ¶ added in v0.21.0
func (s *JavascriptWrap) Apply(page jsparse.JSDocument) (map[string]jsparse.JSDocument, error)
func (*JavascriptWrap) Bundle ¶ added in v0.21.0
func (b *JavascriptWrap) Bundle(configuratorFilePath string, filePath string) error
func (*JavascriptWrap) DoesSatisfyConstraints ¶ added in v0.21.0
func (s *JavascriptWrap) DoesSatisfyConstraints(page jsparse.JSDocument) bool
func (*JavascriptWrap) HydrationFile ¶ added in v0.21.0
func (b *JavascriptWrap) HydrationFile() []embedutils.FileReader
func (*JavascriptWrap) RequiredBodyDOMElements ¶ added in v0.21.0
func (s *JavascriptWrap) RequiredBodyDOMElements(ctx context.Context, cache *CacheDOMOpts) []string
func (*JavascriptWrap) Setup ¶ added in v0.21.0
func (b *JavascriptWrap) Setup(ctx context.Context, settings *BundleOpts) (*BundledResource, error)
func (*JavascriptWrap) Stats ¶ added in v0.21.0
func (s *JavascriptWrap) Stats() *WrapStats
func (*JavascriptWrap) VerifyRequirements ¶ added in v0.21.0
func (b *JavascriptWrap) VerifyRequirements() error
func (*JavascriptWrap) Version ¶ added in v0.21.0
func (s *JavascriptWrap) Version() string
type NewReactSSROpts ¶ added in v0.7.0
type NewReactSSROpts struct { SourceMapDoc *jsparse.DefaultJSDocument InitDoc *jsparse.DefaultJSDocument Bundler *BaseBundler }
type PartialWrapReactSSR ¶ added in v0.21.0
type PartialWrapReactSSR struct { *BaseWebWrapper *BaseBundler // contains filtered or unexported fields }
func NewReactSSRPartial ¶ added in v0.21.0
func NewReactSSRPartial(opts *NewReactSSROpts) *PartialWrapReactSSR
func (*PartialWrapReactSSR) Apply ¶ added in v0.21.0
func (r *PartialWrapReactSSR) Apply(doc jsparse.JSDocument) (jsparse.JSDocument, error)
func (*PartialWrapReactSSR) Setup ¶ added in v0.21.0
func (r *PartialWrapReactSSR) Setup(ctx context.Context, settings *BundleOpts) (*BundledResource, error)
func (*PartialWrapReactSSR) VerifyRequirements ¶ added in v0.21.0
func (r *PartialWrapReactSSR) VerifyRequirements() error
type ReactCSR ¶ added in v0.21.0
type ReactCSR struct { *BaseWebWrapper *BaseBundler }
func NewReactCSR ¶ added in v0.21.0
func NewReactCSR(bundler *BaseBundler) *ReactCSR
func (*ReactCSR) Apply ¶ added in v0.21.0
func (s *ReactCSR) Apply(page jsparse.JSDocument) (map[string]jsparse.JSDocument, error)
func (*ReactCSR) DoesSatisfyConstraints ¶ added in v0.21.0
func (b *ReactCSR) DoesSatisfyConstraints(page jsparse.JSDocument) bool
func (*ReactCSR) HydrationFile ¶ added in v0.21.0
func (b *ReactCSR) HydrationFile() []embedutils.FileReader
func (*ReactCSR) RequiredBodyDOMElements ¶ added in v0.21.0
func (s *ReactCSR) RequiredBodyDOMElements(ctx context.Context, cache *CacheDOMOpts) []string
func (*ReactCSR) Setup ¶ added in v0.21.0
func (b *ReactCSR) Setup(ctx context.Context, settings *BundleOpts) (*BundledResource, error)
func (*ReactCSR) VerifyRequirements ¶ added in v0.21.0
type ReactHydrate ¶ added in v0.21.0
type ReactHydrate struct {
// contains filtered or unexported fields
}
func (*ReactHydrate) Apply ¶ added in v0.21.0
func (s *ReactHydrate) Apply(page jsparse.JSDocument) (map[string]jsparse.JSDocument, error)
func (*ReactHydrate) Bundle ¶ added in v0.21.0
func (b *ReactHydrate) Bundle(configuratorFilePath string, filePath string) error
func (*ReactHydrate) DoesSatisfyConstraints ¶ added in v0.21.0
func (b *ReactHydrate) DoesSatisfyConstraints(page jsparse.JSDocument) bool
func (*ReactHydrate) HydrationFile ¶ added in v0.21.0
func (b *ReactHydrate) HydrationFile() []embedutils.FileReader
func (*ReactHydrate) RequiredBodyDOMElements ¶ added in v0.21.0
func (s *ReactHydrate) RequiredBodyDOMElements(ctx context.Context, cache *CacheDOMOpts) []string
func (*ReactHydrate) Setup ¶ added in v0.21.0
func (b *ReactHydrate) Setup(ctx context.Context, settings *BundleOpts) (*BundledResource, error)
func (*ReactHydrate) Stats ¶ added in v0.21.0
func (s *ReactHydrate) Stats() *WrapStats
func (*ReactHydrate) VerifyRequirements ¶ added in v0.21.0
func (r *ReactHydrate) VerifyRequirements() error
func (*ReactHydrate) Version ¶ added in v0.21.0
func (s *ReactHydrate) Version() string
Source Files ¶
Click to show internal directories.
Click to hide internal directories.