Documentation
¶
Index ¶
- type Remover
- func (r *Remover) Remove(script *ast.Script) error
- func (r *Remover) VisitBoolValue(b *ast.BoolValue)
- func (r *Remover) VisitComment(n *ast.Comment)
- func (r *Remover) VisitElement(e *ast.Element)
- func (r *Remover) VisitExpr(e *ast.Expr)
- func (r *Remover) VisitField(f *ast.Field)
- func (r *Remover) VisitScript(s *ast.Script)
- func (r *Remover) VisitStringValue(s *ast.StringValue)
- func (r *Remover) VisitText(t *ast.Text)
- type Visitor
- func (v *Visitor) Rewrite(script *ast.Script) error
- func (v *Visitor) VisitBoolValue(b *ast.BoolValue)
- func (v *Visitor) VisitComment(n *ast.Comment)
- func (v *Visitor) VisitElement(e *ast.Element)
- func (v *Visitor) VisitExpr(e *ast.Expr)
- func (v *Visitor) VisitField(f *ast.Field)
- func (v *Visitor) VisitScript(s *ast.Script)
- func (v *Visitor) VisitStringValue(s *ast.StringValue)
- func (v *Visitor) VisitText(t *ast.Text)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Remover ¶ added in v0.0.9
type Remover struct {
// contains filtered or unexported fields
}
func (*Remover) VisitBoolValue ¶ added in v0.0.9
func (*Remover) VisitComment ¶ added in v0.0.9
func (*Remover) VisitElement ¶ added in v0.0.9
func (*Remover) VisitField ¶ added in v0.0.9
func (*Remover) VisitScript ¶ added in v0.0.9
func (*Remover) VisitStringValue ¶ added in v0.0.9
func (r *Remover) VisitStringValue(s *ast.StringValue)
type Visitor ¶
type Visitor struct {
Path string // the path to the file
Prefix string // the prefix for the scoped styles (e.g. jsx-)
Attr string // the attribute to prepend the class to (e.g. class)
ImportName string // the name of the import (e.g. Style)
Minify bool // whether to minify the css
Engines []esbuild.Engine // the browser engines we're targeting
// contains filtered or unexported fields
}
func (*Visitor) VisitBoolValue ¶
func (*Visitor) VisitComment ¶
func (*Visitor) VisitElement ¶
func (*Visitor) VisitField ¶
func (*Visitor) VisitScript ¶
func (*Visitor) VisitStringValue ¶
func (v *Visitor) VisitStringValue(s *ast.StringValue)
Click to show internal directories.
Click to hide internal directories.