tailwindcss-patch 8.7.3 → 9.0.0-alpha.1
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 +45 -5
- package/dist/{chunk-7JAOSSRO.js → chunk-5CWNAWKP.js} +1 -1
- package/dist/{chunk-JHEI2MLC.mjs → chunk-A67ABH3M.mjs} +1 -1
- package/dist/{chunk-3T6WSV7F.mjs → chunk-SWLOK2S6.mjs} +476 -315
- package/dist/{chunk-EFYAZO6C.js → chunk-Z6OMJZTU.js} +456 -295
- package/dist/cli.js +5 -5
- package/dist/cli.mjs +2 -2
- package/dist/{dist-NW65QXLC.js → dist-7O2232CU.js} +1 -1
- package/dist/{dist-EMUBVNNO.mjs → dist-7UDSGIWH.mjs} +1 -1
- package/dist/index.d.mts +15 -107
- package/dist/index.d.ts +15 -107
- package/dist/index.js +6 -4
- package/dist/index.mjs +5 -3
- package/package.json +6 -5
package/README.md
CHANGED
|
@@ -115,7 +115,49 @@ Skip `next()` to fully replace a command (e.g. custom `init` or cache clearing b
|
|
|
115
115
|
| `--css <file>` | Provide a CSS entry file when working with Tailwind v4 projects. |
|
|
116
116
|
| `--no-write` | Skip writing to disk and only return the collected classes. |
|
|
117
117
|
|
|
118
|
-
The CLI loads `tailwindcss-patch.config.ts` via `@tailwindcss-mangle/config`.
|
|
118
|
+
The CLI loads `tailwindcss-patch.config.ts` via `@tailwindcss-mangle/config`. v9 expects the modern `registry` shape; use `tw-patch migrate` before upgrading if your config still uses deprecated keys.
|
|
119
|
+
|
|
120
|
+
### v9 upgrade flow
|
|
121
|
+
|
|
122
|
+
1. Run `pnpm dlx tw-patch migrate --dry-run` to preview required config rewrites.
|
|
123
|
+
2. Apply the migration, or rewrite the config manually to modern `registry` fields.
|
|
124
|
+
3. Confirm every config sets `registry.tailwindcss.version` explicitly.
|
|
125
|
+
4. Upgrade to v9 and rerun `tw-patch install` / `tw-patch extract` in your project.
|
|
126
|
+
|
|
127
|
+
Legacy to v9 example:
|
|
128
|
+
|
|
129
|
+
```ts
|
|
130
|
+
// before
|
|
131
|
+
export default defineConfig({
|
|
132
|
+
registry: {
|
|
133
|
+
output: {
|
|
134
|
+
file: '.tw-patch/tw-class-list.json',
|
|
135
|
+
},
|
|
136
|
+
tailwind: {
|
|
137
|
+
package: 'tailwindcss',
|
|
138
|
+
classic: {
|
|
139
|
+
cwd: 'apps/web',
|
|
140
|
+
},
|
|
141
|
+
},
|
|
142
|
+
},
|
|
143
|
+
})
|
|
144
|
+
|
|
145
|
+
// after
|
|
146
|
+
export default defineConfig({
|
|
147
|
+
registry: {
|
|
148
|
+
extract: {
|
|
149
|
+
file: '.tw-patch/tw-class-list.json',
|
|
150
|
+
},
|
|
151
|
+
tailwindcss: {
|
|
152
|
+
version: 3,
|
|
153
|
+
packageName: 'tailwindcss',
|
|
154
|
+
v3: {
|
|
155
|
+
cwd: 'apps/web',
|
|
156
|
+
},
|
|
157
|
+
},
|
|
158
|
+
},
|
|
159
|
+
})
|
|
160
|
+
```
|
|
119
161
|
|
|
120
162
|
### Migrate options
|
|
121
163
|
|
|
@@ -296,9 +338,7 @@ const patchStatus = await patcher.getPatchStatus()
|
|
|
296
338
|
console.log(patchStatus.entries)
|
|
297
339
|
```
|
|
298
340
|
|
|
299
|
-
The constructor accepts
|
|
300
|
-
|
|
301
|
-
Deprecated fields kept temporarily (to be removed in the next major): `cwd`, `overwrite`, `tailwind`, `features`, `output`.
|
|
341
|
+
The constructor accepts the modern object shown above only in v9.
|
|
302
342
|
|
|
303
343
|
Migration mapping:
|
|
304
344
|
|
|
@@ -308,7 +348,7 @@ Migration mapping:
|
|
|
308
348
|
- `features` -> `apply`
|
|
309
349
|
- `output` -> `extract`
|
|
310
350
|
|
|
311
|
-
|
|
351
|
+
Deprecated fields are rejected at runtime in v9. Run `tw-patch migrate --dry-run` to preview required rewrites.
|
|
312
352
|
|
|
313
353
|
Use cache.driver to switch between the default file-backed cache, an in-memory cache (memory), or a no-op cache (noop) when filesystem permissions are restricted.
|
|
314
354
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports, "__esModule", {value: true});// ../../node_modules/.pnpm/tsup@8.5.1_jiti@2.6.1_postcss@8.5.
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true});// ../../node_modules/.pnpm/tsup@8.5.1_jiti@2.6.1_postcss@8.5.8_tsx@4.21.0_typescript@5.9.3_yaml@2.8.2/node_modules/tsup/assets/cjs_shims.js
|
|
2
2
|
var getImportMetaUrl = () => typeof document === "undefined" ? new URL(`file:${__filename}`).href : document.currentScript && document.currentScript.tagName.toUpperCase() === "SCRIPT" ? document.currentScript.src : new URL("main.js", document.baseURI).href;
|
|
3
3
|
var importMetaUrl = /* @__PURE__ */ getImportMetaUrl();
|
|
4
4
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
// ../../node_modules/.pnpm/tsup@8.5.1_jiti@2.6.1_postcss@8.5.
|
|
1
|
+
// ../../node_modules/.pnpm/tsup@8.5.1_jiti@2.6.1_postcss@8.5.8_tsx@4.21.0_typescript@5.9.3_yaml@2.8.2/node_modules/tsup/assets/esm_shims.js
|
|
2
2
|
import path from "path";
|
|
3
3
|
import { fileURLToPath } from "url";
|
|
4
4
|
var getFilename = () => fileURLToPath(import.meta.url);
|