Documentation
¶
Index ¶
Constants ¶
View Source
const DefaultCommand = "prettier --use-tabs --stdin-filepath $TEMPL_PRETTIER_FILENAME"
Variables ¶
This section is empty.
Functions ¶
func IsAvailable ¶
func Run ¶
Run the prettier command with the given input and file name. $TEMPL_PRETTIER_FILENAME is set to the file name being formatted. To format blocks inside templ files a fake name is provided, e.g. format.html, format.js, format.css etc. The command is run in a shell, so it can be a complex command with pipes and redirections.
Examples:
prettier --use-tabs --stdin-filepath $TEMPL_PRETTIER_FILENAME prettierd --use-tabs --stdin-filepath $TEMPL_PRETTIER_FILENAME npx prettier --use-tabs --stdin-filepath $TEMPL_PRETTIER_FILENAME prettier --config ./frontend/.prettierrc --use-tabs --stdin-filepath $TEMPL_PRETTIER_FILENAME
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.