package singlepage
import "zgo.at/singlepage"
Index ¶
- Constants
- Variables
- func Bundle(html []byte, opts Options) (string, error)
- type LookupError
- type Options
- func NewOptions(root string, strict, quiet bool) Options
- func (opts *Options) Commandline(local, remote, minify []string) error
- type ParseError
Constants ¶
Variables ¶
var Everything = Options{ Local: CSS | JS | Image, Remote: CSS | JS | Image, Minify: CSS | JS | Image, }
Everything is an Options struct with everything enabled.
Functions ¶
func Bundle ¶
Bundle the resources in a HTML document according to the given options.
Types ¶
type LookupError ¶
LookupError is used when we can't look up a resource. This may be a non-fatal error.
func (*LookupError) Error ¶
func (e *LookupError) Error() string
type Options ¶
type Options struct { Root string Strict bool Quiet bool Local zint.Bitflag16 Remote zint.Bitflag16 Minify zint.Bitflag16 }
Options for Bundle().
func NewOptions ¶
NewOptions creates a new Options instance.
func (*Options) Commandline ¶
Commandline modifies the Options from the format accepted in the commandline tool's flags.
type ParseError ¶
ParseError indicates there was a parsing failure. This may be a non-fatal error.
func (*ParseError) Error ¶
func (e *ParseError) Error() string
Source Files ¶
bundle.go css.go helpers.go
Directories ¶
Path | Synopsis |
---|---|
cmd | |
cmd/singlepage |
- Version
- v0.0.0-20220403172446-1345e4e61f54 (latest)
- Published
- Apr 3, 2022
- Platform
- linux/amd64
- Imports
- 20 packages
- Last checked
- 3 days ago –
Tools for package owners.