prettier-plugin-askama-temp.../README.md

30 lines
494 B
Markdown
Raw Normal View History

2022-11-18 22:05:06 +03:00
# prettier-plugin-jinja-template
Formatter plugin for jinja2 template files.
## Install
```bash
2022-12-01 20:01:13 +03:00
npm install --save-dev prettier prettier-plugin-jinja-template
2022-11-18 22:05:06 +03:00
```
## Use
2023-01-06 20:32:30 +03:00
To format basic .html files, you'll have to override the used parser inside your `.prettierrc`:
2022-11-18 22:05:06 +03:00
```json
{
2022-11-18 23:22:28 +03:00
"overrides": [
{
"files": ["*.html"],
"options": {
"parser": "jinja-template"
}
}
]
2022-11-18 22:05:06 +03:00
}
```
2023-01-06 20:32:30 +03:00
Run it on all html files in your project:
```bash
npx prettier --write **/*.html
```