Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ScriptElement ¶
func ScriptElement(se *parser.ScriptElement, depth int, prettierCommand string) (err error)
ScriptElement formats a ScriptElement node, replacing Go expressions with placeholders for formatting. After formatting, it updates the GoCode expressions and their ranges.
func StyleElement ¶
func StyleElement(se *parser.RawElement, depth int, prettierCommand string) (err error)
Types ¶
type Config ¶
type Config struct {
// PrettierCommand is the command to run to format the content of script and style elements.
// If empty, the default is "prettier --use-tabs --stdin-filepath $TEMPL_PRETTIER_FILENAME".
PrettierCommand string
// PrettierRequired indicates that formatting using Prettier must be applied.
PrettierRequired bool
}
Click to show internal directories.
Click to hide internal directories.