djlint 1.34.1 → 1.35.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +19 -17
- package/package.json +15 -41
package/README.md
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
|
|
2
1
|
<h1 align="center">
|
|
3
2
|
<br>
|
|
4
|
-
<a href="https://www.djlint.com"><img src="https://raw.githubusercontent.com/
|
|
3
|
+
<a href="https://www.djlint.com"><img src="https://raw.githubusercontent.com/djlint/djLint/master/docs/src/static/img/icon.png" alt="djLint Logo" width="270"></a>
|
|
5
4
|
<br>
|
|
6
5
|
</h1>
|
|
7
6
|
<h3 align="center">🏗️ Maintainers needed, please reach out on discord or email!</h3>
|
|
@@ -14,10 +13,10 @@
|
|
|
14
13
|
</a>
|
|
15
14
|
</p>
|
|
16
15
|
<p align="center">
|
|
17
|
-
<a href="https://codecov.io/gh/
|
|
18
|
-
<img src="https://codecov.io/gh/
|
|
16
|
+
<a href="https://codecov.io/gh/djlint/djlint">
|
|
17
|
+
<img src="https://codecov.io/gh/djlint/djlint/branch/master/graph/badge.svg?token=eNTG721BAA" alt="Codecov Status">
|
|
19
18
|
</a>
|
|
20
|
-
<a href="https://www.codacy.com/gh/
|
|
19
|
+
<a href="https://www.codacy.com/gh/djlint/djlint/dashboard?utm_source=github.com&utm_medium=referral&utm_content=djlint/djlint&utm_campaign=Badge_Grade">
|
|
21
20
|
<img src="https://app.codacy.com/project/badge/Grade/dba6338b0e7a4de896b45b382574f369" alt="Codacy Status">
|
|
22
21
|
</a>
|
|
23
22
|
<a href="https://pepy.tech/project/djlint">
|
|
@@ -39,7 +38,7 @@
|
|
|
39
38
|
</p>
|
|
40
39
|
|
|
41
40
|
<p align="center">
|
|
42
|
-
<img src="https://github.com/
|
|
41
|
+
<img src="https://github.com/djlint/djLint/blob/aa9097660d4a2e840450de5456f656c42bc7dd34/docs/src/static/img/demo-min.gif" alt="demo" width="600">
|
|
43
42
|
</p>
|
|
44
43
|
|
|
45
44
|
## 🤔 For What?
|
|
@@ -58,7 +57,7 @@ Grab it with `pip`
|
|
|
58
57
|
pip install djlint
|
|
59
58
|
```
|
|
60
59
|
|
|
61
|
-
|
|
60
|
+
_Or with the npm experimental install - Note, this requires python and pip to be on your system path._
|
|
62
61
|
|
|
63
62
|
```bash
|
|
64
63
|
npm i djlint
|
|
@@ -69,47 +68,50 @@ Lint your project
|
|
|
69
68
|
```bash
|
|
70
69
|
djlint . --extension=html.j2 --lint
|
|
71
70
|
```
|
|
71
|
+
|
|
72
72
|
Check your format
|
|
73
73
|
|
|
74
74
|
```bash
|
|
75
75
|
djlint . --extension=html.j2 --check
|
|
76
76
|
```
|
|
77
|
+
|
|
77
78
|
Fix my format!
|
|
79
|
+
|
|
78
80
|
```bash
|
|
79
81
|
djlint . --extension=html.j2 --reformat
|
|
80
82
|
```
|
|
81
83
|
|
|
82
84
|
## 💙 Like it?
|
|
83
85
|
|
|
84
|
-
Add a badge to your projects
|
|
86
|
+
Add a badge to your projects `readme.md`:
|
|
85
87
|
|
|
86
88
|
```md
|
|
87
89
|
[](https://www.djlint.com)
|
|
88
90
|
```
|
|
89
91
|
|
|
90
|
-
Add a badge to your
|
|
92
|
+
Add a badge to your `readme.rst`:
|
|
91
93
|
|
|
92
94
|
```rst
|
|
93
95
|
.. image:: https://img.shields.io/badge/html%20style-djlint-blue.svg
|
|
94
96
|
:target: https://www.djlint.com
|
|
95
97
|
```
|
|
96
|
-
Looks like this:
|
|
97
98
|
|
|
98
|
-
|
|
99
|
+
Looks like this:
|
|
99
100
|
|
|
101
|
+
[](https://github.com/djlint/djlint)
|
|
100
102
|
|
|
101
103
|
## 🛠️ Can I help?
|
|
102
104
|
|
|
103
105
|
Yes!
|
|
104
106
|
|
|
105
|
-
|
|
107
|
+
_Would you like to add a rule to the linter?_ Take a look at the [linter docs](https://djlint.com/docs/linter/) and [source code](https://github.com/djlint/djLint/blob/master/djlint/rules.yaml)
|
|
106
108
|
|
|
107
|
-
|
|
109
|
+
_Are you a regex pro?_ Benchmark and submit a pr with improved regex for the [linter rules](https://github.com/djlint/djLint/blob/master/djlint/rules.yaml)
|
|
108
110
|
|
|
109
|
-
**⚠️ Help Needed! ⚠️**
|
|
111
|
+
**⚠️ Help Needed! ⚠️** _Good with python?_ djLint was an experimental project and is catching on with other devs. Help out with a rewrite of the formatter to improve speed and html style for edge cases. Contribute on the [2.0 branch](https://github.com/djlint/djLint/tree/block_indent)
|
|
110
112
|
|
|
111
113
|
## 🏃 Other Tools Of Note
|
|
112
114
|
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
115
|
+
- [DjHTML](https://github.com/rtts/djhtml) A pure-Python Django/Jinja template indenter without dependencies.
|
|
116
|
+
- [HTMLHint](https://htmlhint.com) Static code analysis tool you need for your HTML
|
|
117
|
+
- [curlylint](https://www.curlylint.org) Experimental HTML templates linting for Jinja, Nunjucks, Django templates, Twig, Liquid
|
package/package.json
CHANGED
|
@@ -1,16 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "djlint",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.35.2",
|
|
4
4
|
"description": "HTML Template Linter and Formatter",
|
|
5
|
-
"directories": {
|
|
6
|
-
"doc": "docs",
|
|
7
|
-
"test": "tests"
|
|
8
|
-
},
|
|
9
|
-
"repository": {
|
|
10
|
-
"type": "git",
|
|
11
|
-
"url": "git+https://github.com/Riverside-Healthcare/djLint.git"
|
|
12
|
-
},
|
|
13
|
-
"files": [],
|
|
14
5
|
"keywords": [
|
|
15
6
|
"html template linter",
|
|
16
7
|
"html template formatter",
|
|
@@ -29,43 +20,26 @@
|
|
|
29
20
|
"angular template linter",
|
|
30
21
|
"angular template formatter"
|
|
31
22
|
],
|
|
32
|
-
"
|
|
33
|
-
|
|
34
|
-
"
|
|
35
|
-
"pre-commit": "lint-staged",
|
|
36
|
-
"commit": "git add . && pre-commit run; git add . && npm run pre-commit && cz --no-verify",
|
|
37
|
-
"test": "xo"
|
|
23
|
+
"homepage": "https://djlint.com",
|
|
24
|
+
"bugs": {
|
|
25
|
+
"url": "https://github.com/djlint/djLint/issues"
|
|
38
26
|
},
|
|
27
|
+
"repository": {
|
|
28
|
+
"type": "git",
|
|
29
|
+
"url": "git+https://github.com/djlint/djLint.git"
|
|
30
|
+
},
|
|
31
|
+
"license": "GPL-3.0-or-later",
|
|
39
32
|
"author": {
|
|
40
33
|
"name": "Christopher Pickering",
|
|
41
34
|
"url": "https://going.bg"
|
|
42
35
|
},
|
|
43
|
-
"
|
|
44
|
-
"
|
|
45
|
-
"
|
|
36
|
+
"files": [],
|
|
37
|
+
"scripts": {
|
|
38
|
+
"postinstall": "python3 -m pip install --upgrade djlint==1.35.2"
|
|
46
39
|
},
|
|
47
|
-
"homepage": "https://djlint.com",
|
|
48
40
|
"devDependencies": {
|
|
49
|
-
"@
|
|
50
|
-
"
|
|
51
|
-
"
|
|
52
|
-
"@semantic-release/git": "10.0.1",
|
|
53
|
-
"@semantic-release/github": "9.2.5",
|
|
54
|
-
"@semantic-release/npm": "11.0.2",
|
|
55
|
-
"@semantic-release/release-notes-generator": "12.1.0",
|
|
56
|
-
"cz-conventional-changelog": "3.3.0",
|
|
57
|
-
"lint-staged": "15.2.0",
|
|
58
|
-
"prettier": "^3.0.0",
|
|
59
|
-
"semantic-release": "22.0.12"
|
|
60
|
-
},
|
|
61
|
-
"config": {
|
|
62
|
-
"commitizen": {
|
|
63
|
-
"path": "./node_modules/cz-conventional-changelog"
|
|
64
|
-
}
|
|
65
|
-
},
|
|
66
|
-
"lint-staged": {
|
|
67
|
-
"{bin,docs}/**/*.{ts,css,less,scss,js,json,md,yaml,html}": [
|
|
68
|
-
"npm run format"
|
|
69
|
-
]
|
|
41
|
+
"@ianvs/prettier-plugin-sort-imports": "4.3.1",
|
|
42
|
+
"prettier": "3.3.3",
|
|
43
|
+
"prettier-plugin-packagejson": "2.5.2"
|
|
70
44
|
}
|
|
71
45
|
}
|