@ttskch/prettier-plugin-tailwindcss-anywhere 0.0.0 → 0.0.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 +6 -5
- package/dist/src/index.js +1 -1
- package/package.json +2 -2
- package/src/index.ts +1 -1
package/README.md
CHANGED
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
|
|
3
3
|
[](https://github.com/ttskch/prettier-plugin-tailwindcss-anywhere/actions/workflows/ci.yaml?query=branch:main)
|
|
4
4
|
[](https://codecov.io/gh/ttskch/prettier-plugin-tailwindcss-anywhere)
|
|
5
|
-

|
|
6
|
-

|
|
5
|
+
[](https://www.npmjs.com/package/@ttskch/prettier-plugin-tailwindcss-anywhere)
|
|
6
|
+
[](https://www.npmjs.com/package/@ttskch/prettier-plugin-tailwindcss-anywhere)
|
|
7
7
|
|
|
8
8
|
A Prettier plugin for sorting TailwindCSS classes **in any HTML-like language, like Twig etc**⚡
|
|
9
9
|
|
|
@@ -68,7 +68,9 @@ For example, by setting `.prettierrc` as follows, you can sort classes even in f
|
|
|
68
68
|
|
|
69
69
|
## Options
|
|
70
70
|
|
|
71
|
-
### `regex`
|
|
71
|
+
### `regex`
|
|
72
|
+
|
|
73
|
+
**default:** `class="([^"]*)"`
|
|
72
74
|
|
|
73
75
|
The `regex` option allows you to specify the part that corresponds to the value of the class attribute using a regular expression.
|
|
74
76
|
|
|
@@ -84,8 +86,7 @@ In this case, you can specify the following `regex` to sort only the part before
|
|
|
84
86
|
{
|
|
85
87
|
"options": {
|
|
86
88
|
"parser": "anywhere",
|
|
87
|
-
"
|
|
88
|
-
"regex": 'class="([^{}"]*)(?:"| {)' // <-- here
|
|
89
|
+
"regex": "class=\"([^{}\"]*)(?:\"| {)", // <-- here
|
|
89
90
|
}
|
|
90
91
|
}
|
|
91
92
|
```
|
package/dist/src/index.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ttskch/prettier-plugin-tailwindcss-anywhere",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.2",
|
|
4
4
|
"description": "A Prettier plugin for sorting TailwindCSS classes in any HTML-like language, like Twig etc.",
|
|
5
5
|
"keywords": ["prettier", "tailwindcss", "formatter", "html", "twig"],
|
|
6
6
|
"type": "module",
|
|
@@ -9,12 +9,12 @@
|
|
|
9
9
|
},
|
|
10
10
|
"packageManager": "pnpm@9.12.3",
|
|
11
11
|
"main": "dist/src/index.js",
|
|
12
|
-
"files": ["dist", "src"],
|
|
13
12
|
"exports": {
|
|
14
13
|
".": {
|
|
15
14
|
"import": "./dist/src/index.js"
|
|
16
15
|
}
|
|
17
16
|
},
|
|
17
|
+
"files": ["dist", "src"],
|
|
18
18
|
"dependencies": {
|
|
19
19
|
"tslib": "~2.7"
|
|
20
20
|
},
|
package/src/index.ts
CHANGED