update readme to include prettier v3 instructions
This commit is contained in:
parent
c0f1ca478d
commit
bea4b534bc
1 changed files with 12 additions and 0 deletions
12
README.md
12
README.md
|
@ -8,6 +8,13 @@ Formatter plugin for jinja2 template files.
|
||||||
npm install --save-dev prettier prettier-plugin-jinja-template
|
npm install --save-dev prettier prettier-plugin-jinja-template
|
||||||
```
|
```
|
||||||
|
|
||||||
|
Add the plugin to your `.prettierrc`:
|
||||||
|
```json
|
||||||
|
{
|
||||||
|
"plugins": ["prettier-plugin-jinja-template"]
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
## Use
|
## Use
|
||||||
|
|
||||||
To format basic .html files, you'll have to override the used parser inside your `.prettierrc`:
|
To format basic .html files, you'll have to override the used parser inside your `.prettierrc`:
|
||||||
|
@ -28,3 +35,8 @@ Run it on all html files in your project:
|
||||||
```bash
|
```bash
|
||||||
npx prettier --write **/*.html
|
npx prettier --write **/*.html
|
||||||
```
|
```
|
||||||
|
|
||||||
|
If you don't have a prettier config you can run the plugin with this command:
|
||||||
|
```bash
|
||||||
|
npx prettier --write **/*.html --plugin=prettier-plugin-jinja-template
|
||||||
|
```
|
Loading…
Reference in a new issue