style

package
v0.0.6 Latest Latest
Warning

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

Go to latest
Published: May 5, 2024 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

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) Rewrite

func (v *Visitor) Rewrite(script *ast.Script) error

Rewrite the script with the scoped styles

func (*Visitor) VisitBoolValue

func (v *Visitor) VisitBoolValue(b *ast.BoolValue)

func (*Visitor) VisitComment

func (v *Visitor) VisitComment(n *ast.Comment)

func (*Visitor) VisitElement

func (v *Visitor) VisitElement(e *ast.Element)

func (*Visitor) VisitExpr

func (v *Visitor) VisitExpr(e *ast.Expr)

func (*Visitor) VisitField

func (v *Visitor) VisitField(f *ast.Field)

func (*Visitor) VisitScript

func (v *Visitor) VisitScript(s *ast.Script)

func (*Visitor) VisitStringValue

func (v *Visitor) VisitStringValue(s *ast.StringValue)

func (*Visitor) VisitText

func (v *Visitor) VisitText(t *ast.Text)

Jump to

Keyboard shortcuts

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