@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 CHANGED
@@ -2,8 +2,8 @@
2
2
 
3
3
  [![](https://github.com/ttskch/prettier-plugin-tailwindcss-anywhere/actions/workflows/ci.yaml/badge.svg?branch=main)](https://github.com/ttskch/prettier-plugin-tailwindcss-anywhere/actions/workflows/ci.yaml?query=branch:main)
4
4
  [![codecov](https://codecov.io/gh/ttskch/prettier-plugin-tailwindcss-anywhere/graph/badge.svg?token=GEZ1cdUmSx)](https://codecov.io/gh/ttskch/prettier-plugin-tailwindcss-anywhere)
5
- ![NPM Version](https://img.shields.io/npm/v/%40ttskch%2Fprettier-plugin-tailwindcss-anywhere)
6
- ![NPM Downloads](https://img.shields.io/npm/dm/%40ttskch%2Fprettier-plugin-tailwindcss-anywhere)
5
+ [![NPM Version](https://img.shields.io/npm/v/%40ttskch%2Fprettier-plugin-tailwindcss-anywhere)](https://www.npmjs.com/package/@ttskch/prettier-plugin-tailwindcss-anywhere)
6
+ [![NPM Downloads](https://img.shields.io/npm/dm/%40ttskch%2Fprettier-plugin-tailwindcss-anywhere)](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
- "plugins": ["@ttskch/prettier-plugin-tailwindcss-anywhere"],
88
- "regex": 'class="([^{}"]*)(?:"| {)' // <-- here
89
+ "regex": "class=\"([^{}\"]*)(?:\"| {)", // <-- here
89
90
  }
90
91
  }
91
92
  ```
package/dist/src/index.js CHANGED
@@ -28,7 +28,7 @@ export const options = {
28
28
  regex: {
29
29
  type: "string",
30
30
  category: "Anywhere",
31
- default: 'class="([^{}"]*)"',
31
+ default: 'class="([^"]*)"',
32
32
  description: "regex to match class attribute",
33
33
  },
34
34
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ttskch/prettier-plugin-tailwindcss-anywhere",
3
- "version": "0.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
@@ -52,7 +52,7 @@ export const options: Record<string, SupportOption> = {
52
52
  regex: {
53
53
  type: "string",
54
54
  category: "Anywhere",
55
- default: 'class="([^{}"]*)"',
55
+ default: 'class="([^"]*)"',
56
56
  description: "regex to match class attribute",
57
57
  },
58
58
  };