tailwindcss-patch 5.0.0-alpha.0 → 5.0.1-alpha.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/dist/cli.d.cts ADDED
@@ -0,0 +1,2 @@
1
+
2
+ export { }
package/dist/cli.d.ts ADDED
@@ -0,0 +1,2 @@
1
+
2
+ export { }
package/dist/cli.js ADDED
@@ -0,0 +1,35 @@
1
+ import {
2
+ TailwindcssPatcher,
3
+ config_exports,
4
+ getPatchOptions,
5
+ logger_default
6
+ } from "./chunk-P2MLMFLP.js";
7
+
8
+ // src/cli.ts
9
+ import process from "node:process";
10
+ import cac from "cac";
11
+ function init() {
12
+ const cwd = process.cwd();
13
+ return (0, config_exports.initConfig)(cwd);
14
+ }
15
+ var cli = cac();
16
+ cli.command("install", "patch install").action(() => {
17
+ const twPatcher = new TailwindcssPatcher({
18
+ patch: getPatchOptions()
19
+ });
20
+ twPatcher.patch();
21
+ });
22
+ cli.command("init").action(async () => {
23
+ await init();
24
+ logger_default.success(`\u2728 ${config_exports.configName}.config.ts initialized!`);
25
+ });
26
+ cli.command("extract").action(async () => {
27
+ const { config } = await (0, config_exports.getConfig)();
28
+ if (config) {
29
+ const twPatcher = new TailwindcssPatcher();
30
+ const p = await twPatcher.extract(config.patch);
31
+ logger_default.success(`\u2728 tailwindcss-patch extract success! file path: ${p}`);
32
+ }
33
+ });
34
+ cli.help();
35
+ cli.parse();