tailwindcss-patch 8.2.3 → 8.3.0

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
@@ -39,6 +39,26 @@ pnpm dlx tw-patch extract
39
39
  pnpm dlx tw-patch tokens --format lines
40
40
  ```
41
41
 
42
+ ### Embed into another CLI
43
+
44
+ Reuse the same commands inside your own `cac` program:
45
+
46
+ ```ts
47
+ import cac from 'cac'
48
+ import { mountTailwindcssPatchCommands } from 'tailwindcss-patch'
49
+
50
+ const cli = cac('my-tool')
51
+ mountTailwindcssPatchCommands(cli, {
52
+ commandPrefix: 'tw:', // optional
53
+ commands: ['install', 'tokens'], // mount a subset if needed (defaults to all)
54
+ commandOptions: {
55
+ install: { name: 'patch-install', aliases: ['tw-install'] }, // override names/aliases
56
+ },
57
+ })
58
+ cli.help()
59
+ cli.parse()
60
+ ```
61
+
42
62
  ### Extract options
43
63
 
44
64
  | Flag | Description |