@rielj/nyx 0.0.1 → 0.0.3
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 +66 -0
- package/package.json +3 -2
package/README.md
ADDED
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
# nyx
|
|
2
|
+
|
|
3
|
+
Tailwind CSS class formatter and linter. Canonicalizes non-standard class names and sorts classes using Tailwind's official ordering.
|
|
4
|
+
|
|
5
|
+
Built on top of `@tailwindcss/oxide` and the Tailwind v4 design system.
|
|
6
|
+
|
|
7
|
+
## Install
|
|
8
|
+
|
|
9
|
+
```bash
|
|
10
|
+
npm install -g @rielj/nyx
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
## Usage
|
|
14
|
+
|
|
15
|
+
### Check (lint + format)
|
|
16
|
+
|
|
17
|
+
```bash
|
|
18
|
+
nyx check src/
|
|
19
|
+
nyx check "src/**/*.tsx"
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
### Lint
|
|
23
|
+
|
|
24
|
+
Find non-canonical Tailwind classes (e.g. `tw-bg-red-500` -> `bg-red-500`):
|
|
25
|
+
|
|
26
|
+
```bash
|
|
27
|
+
nyx lint src/
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
### Format
|
|
31
|
+
|
|
32
|
+
Sort Tailwind classes in the recommended order:
|
|
33
|
+
|
|
34
|
+
```bash
|
|
35
|
+
nyx format src/
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
### Auto-fix
|
|
39
|
+
|
|
40
|
+
Add `--fix` to any command to write changes to disk:
|
|
41
|
+
|
|
42
|
+
```bash
|
|
43
|
+
nyx check --fix src/
|
|
44
|
+
nyx lint --fix src/
|
|
45
|
+
nyx format --fix src/
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
## Options
|
|
49
|
+
|
|
50
|
+
| Flag | Description |
|
|
51
|
+
|---|---|
|
|
52
|
+
| `--css <path>` | Path to CSS entry point |
|
|
53
|
+
| `--fix` | Auto-fix issues |
|
|
54
|
+
| `--strategy <name>` | Sort strategy: `tailwind` (default) or `alphabetical` |
|
|
55
|
+
| `--rem <px>` | Root font size in px (default: 16) |
|
|
56
|
+
| `--collapse` | Collapse e.g. `mt-2 mr-2 mb-2 ml-2` into `m-2` |
|
|
57
|
+
| `--json` | Output diagnostics as JSON |
|
|
58
|
+
| `--quiet` | Only show summary |
|
|
59
|
+
|
|
60
|
+
## Supported file types
|
|
61
|
+
|
|
62
|
+
`.html`, `.jsx`, `.tsx`, `.vue`, `.svelte`, `.astro`, `.erb`, `.ejs`, `.hbs`, `.php`, `.blade.php`, `.twig`, `.njk`, `.liquid`, `.pug`, `.slim`, `.haml`, `.mdx`, `.md`, `.rs`, `.ex`, `.heex`, `.clj`, `.cljs`
|
|
63
|
+
|
|
64
|
+
## License
|
|
65
|
+
|
|
66
|
+
MIT
|
package/package.json
CHANGED
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
"email": "bulaybulay.rielj@gmail.com",
|
|
10
10
|
"url": "https://rielj.xyz"
|
|
11
11
|
},
|
|
12
|
-
"version": "0.0.
|
|
12
|
+
"version": "0.0.3",
|
|
13
13
|
"description": "Tailwind CSS canonical class fixer CLI",
|
|
14
14
|
"type": "module",
|
|
15
15
|
"bin": {
|
|
@@ -24,7 +24,8 @@
|
|
|
24
24
|
}
|
|
25
25
|
},
|
|
26
26
|
"files": [
|
|
27
|
-
"dist"
|
|
27
|
+
"dist",
|
|
28
|
+
"README.md"
|
|
28
29
|
],
|
|
29
30
|
"scripts": {
|
|
30
31
|
"build": "tsup",
|