Documentation ¶
Index ¶
- Variables
- type BuildEnv
- type Builder
- type BuilderOpts
- type CSSBuilder
- func (cb *CSSBuilder) CanHandle(path string, file fs.FileInfo) bool
- func (cb *CSSBuilder) Init() error
- func (cb *CSSBuilder) IsCssFile(path string, file fs.FileInfo) bool
- func (cb *CSSBuilder) Process(path string, file fs.FileInfo) error
- func (cb *CSSBuilder) ProcessAsByte(path string, file fs.FileInfo) ([]byte, error)
- type CopyBuilder
- type FileBuilder
- type FileWriter
- type FolderBuilder
- type HTMLBuilder
- func (cb *HTMLBuilder) CanHandle(path string, file fs.FileInfo) bool
- func (cb *HTMLBuilder) GetPathData(path string) map[string]interface{}
- func (cb *HTMLBuilder) GetPathDataDir(varsDir string) map[string]interface{}
- func (cb *HTMLBuilder) Init() error
- func (cb *HTMLBuilder) IsHtmlFile(path string, file fs.FileInfo) bool
- func (cb *HTMLBuilder) Process(path string, file fs.FileInfo) error
- func (cb *HTMLBuilder) ProcessAsByte(path string, file fs.FileInfo) ([]byte, error)
- func (cb *HTMLBuilder) RewritePath(path string) string
- type JSBuilder
- func (cb *JSBuilder) CanHandle(path string, file fs.FileInfo) bool
- func (cb *JSBuilder) GetInternal(path string) []byte
- func (cb *JSBuilder) Init() error
- func (cb *JSBuilder) IsJsFile(path string, file fs.FileInfo) bool
- func (cb *JSBuilder) Process(path string, file fs.FileInfo) error
- func (cb *JSBuilder) ProcessAsByte(path string, file fs.FileInfo) ([]byte, error)
- type NOOPMinifier
- type TDMinifier
Constants ¶
This section is empty.
Variables ¶
View Source
var CSSBuilderImportRegexp = regexp.MustCompile(`(?m)^\s*@import "local:\/\/(.*)";\s*$`)
View Source
var ErrTooDeep = errors.New("too deep")
View Source
var HTMLBuilderImportRegexp = regexp.MustCompile(`(?m)<!--\s*#import\s+(.*)\s*-->`)
View Source
var JSBuilderImportHTMLVarsFuncRegexp = regexp.MustCompile(`(?m)toastfront\.pagevars\((.+)\)`)
View Source
var JSBuilderImportRegexp = regexp.MustCompile(`(?m)^import "local:\/\/(.*)";$`)
View Source
var JSBuilderImportVarsFuncRegexp = regexp.MustCompile(`(?m)toastfront\.jsvars\(\)`)
Functions ¶
This section is empty.
Types ¶
type Builder ¶
type Builder struct {
// contains filtered or unexported fields
}
func NewBuilder ¶
func (*Builder) Build ¶
func (b *Builder) Build(opts ...*BuilderOpts) error
func (*Builder) ShouldHandle ¶
type BuilderOpts ¶
type BuilderOpts struct { }
type CSSBuilder ¶
type CSSBuilder struct {
// contains filtered or unexported fields
}
func (*CSSBuilder) Init ¶
func (cb *CSSBuilder) Init() error
func (*CSSBuilder) ProcessAsByte ¶
type CopyBuilder ¶
type CopyBuilder struct {
// contains filtered or unexported fields
}
func (*CopyBuilder) CanHandle ¶
func (cp *CopyBuilder) CanHandle(path string, file fs.FileInfo) bool
func (*CopyBuilder) Init ¶
func (cp *CopyBuilder) Init() error
func (*CopyBuilder) IsAssetsFile ¶
func (cp *CopyBuilder) IsAssetsFile(path string, file fs.FileInfo) bool
func (*CopyBuilder) RewritePath ¶
func (cp *CopyBuilder) RewritePath(path string) string
type FileBuilder ¶
type FileWriter ¶
type FileWriter interface {
Writer(string, io.WriteCloser) io.WriteCloser
}
type FolderBuilder ¶
type FolderBuilder struct {
// contains filtered or unexported fields
}
func (*FolderBuilder) CanHandle ¶
func (fb *FolderBuilder) CanHandle(path string, file fs.FileInfo) bool
func (*FolderBuilder) Init ¶
func (fb *FolderBuilder) Init() error
func (*FolderBuilder) Process ¶
func (fb *FolderBuilder) Process(path string, file fs.FileInfo) error
func (*FolderBuilder) RewritePath ¶
func (fb *FolderBuilder) RewritePath(path string) string
type HTMLBuilder ¶
type HTMLBuilder struct {
// contains filtered or unexported fields
}
func (*HTMLBuilder) CanHandle ¶
func (cb *HTMLBuilder) CanHandle(path string, file fs.FileInfo) bool
func (*HTMLBuilder) GetPathData ¶
func (cb *HTMLBuilder) GetPathData(path string) map[string]interface{}
func (*HTMLBuilder) GetPathDataDir ¶
func (cb *HTMLBuilder) GetPathDataDir(varsDir string) map[string]interface{}
func (*HTMLBuilder) Init ¶
func (cb *HTMLBuilder) Init() error
func (*HTMLBuilder) IsHtmlFile ¶
func (cb *HTMLBuilder) IsHtmlFile(path string, file fs.FileInfo) bool
func (*HTMLBuilder) ProcessAsByte ¶
func (*HTMLBuilder) RewritePath ¶
func (cb *HTMLBuilder) RewritePath(path string) string
type JSBuilder ¶
type JSBuilder struct { VarsFile string // contains filtered or unexported fields }
func (*JSBuilder) GetInternal ¶
type NOOPMinifier ¶
type NOOPMinifier struct { }
func (*NOOPMinifier) Writer ¶
func (m *NOOPMinifier) Writer(mediatype string, out io.WriteCloser) io.WriteCloser
type TDMinifier ¶
type TDMinifier struct {
Minifier *minify.M
}
func (*TDMinifier) Writer ¶
func (m *TDMinifier) Writer(mediatype string, out io.WriteCloser) io.WriteCloser
Click to show internal directories.
Click to hide internal directories.