You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+35-9Lines changed: 35 additions & 9 deletions
Original file line number
Diff line number
Diff line change
@@ -25,10 +25,37 @@ Please [follow the guide](https://tailwindcss.com/docs/installation/) to set up
25
25
npm install tailwindcss-classnames
26
26
```
27
27
28
-
**⚠️ NOTE:** This project versions match with TailwindCSS versions except for [semver _patch_](https://semver.org/) releases
28
+
**NOTE:** This project versions match with TailwindCSS versions except for [semver _patch_](https://semver.org/) releases
29
29
30
30
The project is literally the [classnames](https://www.npmjs.com/package/classnames) project with custom typing. That means it arrives at your browser at approximately **370b** minified and gzipped ([bundlephobia](https://bundlephobia.com/result?p=tailwindcss-classnames)).
31
31
32
+
## **Whats New in v3**
33
+
34
+
- Way better performance overall (thanks to [@dylanvann](https://github.com/DylanVann)'s [idea and suggestions](https://github.com/muhammadsammy/tailwindcss-classnames/pull/281#discussion_r731682711)):
35
+
36
+
- Generated file size is reduced to be **< 200 KB** (default config). Previous version was generating a file sized about [100 MB](https://github.com/muhammadsammy/tailwindcss-classnames/issues/282).
37
+
- Fast autocompletion: this is due to usage of more specific utility functions and using template string types
38
+
39
+
-**BREAKING**: Dropped support for JIT engine's Colors Opacity suffix feature (due to TypesScript _TS2590_ error)
40
+
41
+
-**BREAKING**: Create Utility functions that accepts classnames (and pseudoclassnames) of that category. The `classnames` function won't accept or show autocompletion of all classnames anymore, but it will accept a function of these category functions [(#293)](https://github.com/muhammadsammy/tailwindcss-classnames/issues/293)
@@ -108,10 +135,10 @@ The types included in this package are the default tailwindcss classes, but if y
108
135
109
136
### CLI arguments
110
137
111
-
-`-i`, `--input`Name or relative path of the TailwindCSS config file **(if not provided, tries to find 'tailwind.config.js')**
112
-
-`-o`, `--output`Name or relative path of the generated types file **(optional, default: "tailwindcss-classnames.ts")**
113
-
-`-x`, `--extra`Name or relative path of the file with the custom extra types **(optional)**
114
-
-`-h`, `--help`display help for command
138
+
-`-i`, `--input` Name or relative path of the TailwindCSS config file **(if not provided, tries to find 'tailwind.config.js')**
139
+
-`-o`, `--output` Name or relative path of the generated types file **(optional, default: "tailwindcss-classnames.ts")**
140
+
-`-x`, `--extra` Name or relative path of the file with the custom extra types **(optional)**
141
+
-`-h`, `--help` display help for command
115
142
116
143
### Example of CLI usage
117
144
@@ -135,11 +162,10 @@ type MyCustomType =
135
162
136
163
### Known limitiations
137
164
138
-
- Relative imports inside the config does not work. use `__dirname` instead. See [#120](https://github.com/muhammadsammy/tailwindcss-classnames/issues/120) for details.
139
-
- Only official TailwindLabs plugins are supported.
165
+
- Relative imports inside the config does not work. use `__dirname` instead. See [#120](https://github.com/muhammadsammy/tailwindcss-classnames/issues/120) .
140
166
- `npxtailwindcss-classnames` won't work. Use as an npm script as mentioned above.
141
-
- Limited support for the JIT engine ([#204](https://github.com/muhammadsammy/tailwindcss-classnames/issues/204)).
0 commit comments