0.1.2 • Published 2 years ago
@phragon/extender-prettier v0.1.2
@phragon/extender-prettier
Adds the prettier formatter to the PhragonJS project.
❯ Install
# this is not necessary, once added to the configuration file, the dependencies are installed automatically
$ npm install --save @phragon/extender-prettierUsage
Add an extension method to
phragon.config.ts\ If you want to use theprettierversion installed globally, add to the configuration:{ version: "global" }
import type { BuilderI } from "phragon";
import type { ExtenderPrettierOptions } from "@phragon/extender-prettier";
export default async function config(builder: BuilderI) {
	builder
		// extender
		.extender("prettier", {
			parser: [/* additional extension */],
			// version: "global" | "latest" | "^2.7.1"
		} as ExtenderPrettierOptions)
		// config
		.phragon
		.lexicon("en")
		.render("react", false)
		.publicPath("./public");
}