web

package
v0.0.0-...-52b1b20 Latest Latest
Warning

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

Go to latest
Published: Jul 21, 2020 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// PrettierDefaultLangs is the list of languages used if Prettier.Langs is empty.
	PrettierDefaultLangs = []mg.Lang{
		mg.CSS,
		mg.HTML,
		mg.JS,
		mg.JSON,
		mg.JSX,
		mg.SVG,
		mg.TS,
		mg.TSX,
		mg.XML,
	}
)

Functions

This section is empty.

Types

type Prettier

type Prettier struct {
	mg.ReducerType

	// Langs is the list of languages to fmt.
	// It's empty (len==0), PrettierDefaultLangs is used.
	Langs []mg.Lang
}

Prettier is a reducer that does code fmt'ing using https://github.com/prettier/prettier By default it fmt's CSS, HTML, JS, JSON, JSX, SVG, TS, TSX and XML files.

NOTE: as a special-case, files with extensions starting with `.sublime-` are ignored. NOTE: you will need to install prettier separately

func (*Prettier) Reduce

func (p *Prettier) Reduce(mx *mg.Ctx) *mg.State

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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