chore: 🎨 rebrand
This commit is contained in:
parent
bea4b534bc
commit
559b2b0506
5 changed files with 20 additions and 22 deletions
13
README.md
13
README.md
|
@ -1,17 +1,16 @@
|
|||
# prettier-plugin-jinja-template
|
||||
|
||||
Formatter plugin for jinja2 template files.
|
||||
# prettier-plugin-askama-template
|
||||
[prettier-plugin-jinja-template](https://github.com/davidodenwald/prettier-plugin-jinja-template) but with patches to work with Askama.
|
||||
|
||||
## Install
|
||||
|
||||
```bash
|
||||
npm install --save-dev prettier prettier-plugin-jinja-template
|
||||
npm install --save-dev prettier https://git.fetbuk.ru/WerySkok/prettier-plugin-askama-template.git
|
||||
```
|
||||
|
||||
Add the plugin to your `.prettierrc`:
|
||||
```json
|
||||
{
|
||||
"plugins": ["prettier-plugin-jinja-template"]
|
||||
"plugins": ["prettier-plugin-askama-template"]
|
||||
}
|
||||
```
|
||||
|
||||
|
@ -24,7 +23,7 @@ To format basic .html files, you'll have to override the used parser inside your
|
|||
{
|
||||
"files": ["*.html"],
|
||||
"options": {
|
||||
"parser": "jinja-template"
|
||||
"parser": "askama-template"
|
||||
}
|
||||
}
|
||||
]
|
||||
|
@ -38,5 +37,5 @@ 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
|
||||
npx prettier --write **/*.html --plugin=prettier-plugin-askama-template
|
||||
```
|
6
package-lock.json
generated
6
package-lock.json
generated
|
@ -1,11 +1,11 @@
|
|||
{
|
||||
"name": "prettier-plugin-jinja-template",
|
||||
"name": "prettier-plugin-askama-template",
|
||||
"version": "1.0.0",
|
||||
"lockfileVersion": 2,
|
||||
"requires": true,
|
||||
"packages": {
|
||||
"": {
|
||||
"name": "prettier-plugin-jinja-template",
|
||||
"name": "prettier-plugin-askama-template",
|
||||
"version": "1.0.0",
|
||||
"license": "MIT",
|
||||
"devDependencies": {
|
||||
|
@ -17,7 +17,7 @@
|
|||
"typescript": "^5.1.6"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"prettier": "^2.0.0"
|
||||
"prettier": "^3.0.0"
|
||||
}
|
||||
},
|
||||
"node_modules/@ampproject/remapping": {
|
||||
|
|
14
package.json
14
package.json
|
@ -1,25 +1,23 @@
|
|||
{
|
||||
"name": "prettier-plugin-jinja-template",
|
||||
"name": "prettier-plugin-askama-template",
|
||||
"version": "1.0.0",
|
||||
"description": "Prettier plugin for formatting jinja templates.",
|
||||
"description": "prettier-plugin-jinja-template but with patches to work with Askama.",
|
||||
"author": "David Odenwald",
|
||||
"license": "MIT",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git+https://github.com/davidodenwald/prettier-plugin-jinja-template.git"
|
||||
"url": "git+https://git.fetbuk.ru/WerySkok/prettier-plugin-askama-template.git"
|
||||
},
|
||||
"bugs": {
|
||||
"url": "https://github.com/davidodenwald/prettier-plugin-jinja-template/issues"
|
||||
"url": "https://git.fetbuk.ru/WerySkok/prettier-plugin-askama-template/issues"
|
||||
},
|
||||
"homepage": "https://github.com/davidodenwald/prettier-plugin-jinja-template#readme",
|
||||
"homepage": "https://git.fetbuk.ru/WerySkok/prettier-plugin-askama-template#readme",
|
||||
"keywords": [
|
||||
"prettier",
|
||||
"plugin",
|
||||
"template",
|
||||
"html",
|
||||
"jinja",
|
||||
"jinja2",
|
||||
"flask"
|
||||
"askama"
|
||||
],
|
||||
"main": "lib/index.js",
|
||||
"scripts": {
|
||||
|
|
|
@ -3,14 +3,14 @@ import { parse } from "./parser";
|
|||
import { print, embed, getVisitorKeys } from "./printer";
|
||||
import { Parser, Printer, SupportLanguage } from "prettier";
|
||||
|
||||
const PLUGIN_KEY = "jinja-template";
|
||||
const PLUGIN_KEY = "askama-template";
|
||||
|
||||
export const languages: SupportLanguage[] = [
|
||||
{
|
||||
name: "JinjaTemplate",
|
||||
name: "AskamaTemplate",
|
||||
parsers: [PLUGIN_KEY],
|
||||
extensions: [".jinja", ".jinja2", ".j2", ".html"],
|
||||
vscodeLanguageIds: ["jinja"],
|
||||
extensions: [".jinja", ".jinja2", ".j2", ".html", "askama"],
|
||||
vscodeLanguageIds: ["askama"],
|
||||
},
|
||||
];
|
||||
|
||||
|
|
|
@ -42,4 +42,5 @@ export const nonClosingStatements = [
|
|||
"from",
|
||||
"extends",
|
||||
"pluralize",
|
||||
"when"
|
||||
];
|
||||
|
|
Loading…
Reference in a new issue