tailwindcss-patch 2.2.3 → 3.0.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.cjs +11 -8
- package/dist/cli.mjs +9 -7
- package/dist/index.cjs +30 -587
- package/dist/index.d.cts +30 -20
- package/dist/index.d.mts +30 -20
- package/dist/index.d.ts +30 -20
- package/dist/index.mjs +14 -556
- package/dist/shared/tailwindcss-patch.2fb4223c.cjs +799 -0
- package/dist/shared/tailwindcss-patch.c6a99ac9.mjs +768 -0
- package/package.json +36 -34
package/dist/cli.cjs
CHANGED
|
@@ -1,34 +1,37 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
+
const process = require('node:process');
|
|
3
4
|
const cac = require('cac');
|
|
4
5
|
const config = require('@tailwindcss-mangle/config');
|
|
5
|
-
const index = require('./
|
|
6
|
+
const index = require('./shared/tailwindcss-patch.2fb4223c.cjs');
|
|
7
|
+
require('@babel/types');
|
|
6
8
|
require('node:path');
|
|
7
9
|
require('node:fs');
|
|
10
|
+
require('semver');
|
|
8
11
|
require('node:fs/promises');
|
|
9
12
|
require('resolve');
|
|
10
|
-
require('@babel/types');
|
|
11
13
|
require('@babel/generator');
|
|
12
14
|
require('@babel/traverse');
|
|
13
15
|
require('@babel/parser');
|
|
14
|
-
require('semver');
|
|
15
16
|
require('postcss');
|
|
16
17
|
require('lilconfig');
|
|
17
18
|
require('jiti');
|
|
18
19
|
|
|
19
20
|
function _interopDefaultCompat (e) { return e && typeof e === 'object' && 'default' in e ? e.default : e; }
|
|
20
21
|
|
|
22
|
+
const process__default = /*#__PURE__*/_interopDefaultCompat(process);
|
|
21
23
|
const cac__default = /*#__PURE__*/_interopDefaultCompat(cac);
|
|
22
24
|
|
|
23
25
|
function init() {
|
|
24
|
-
const cwd =
|
|
26
|
+
const cwd = process__default.cwd();
|
|
25
27
|
return config.initConfig(cwd);
|
|
26
28
|
}
|
|
27
29
|
const cli = cac__default();
|
|
28
30
|
cli.command("install", "patch install").action(() => {
|
|
29
|
-
const
|
|
30
|
-
|
|
31
|
-
|
|
31
|
+
const twPatcher = new index.TailwindcssPatcher({
|
|
32
|
+
patch: index.getPatchOptions()
|
|
33
|
+
});
|
|
34
|
+
twPatcher.patch();
|
|
32
35
|
});
|
|
33
36
|
cli.command("init").action(async () => {
|
|
34
37
|
await init();
|
|
@@ -39,7 +42,7 @@ cli.command("extract").action(async () => {
|
|
|
39
42
|
if (config$1) {
|
|
40
43
|
const twPatcher = new index.TailwindcssPatcher();
|
|
41
44
|
const p = await twPatcher.extract(config$1.patch);
|
|
42
|
-
console.log(
|
|
45
|
+
console.log(`\u2728 tailwindcss-patch extract success! file path: ${p}`);
|
|
43
46
|
}
|
|
44
47
|
});
|
|
45
48
|
cli.help();
|
package/dist/cli.mjs
CHANGED
|
@@ -1,15 +1,16 @@
|
|
|
1
|
+
import process from 'node:process';
|
|
1
2
|
import cac from 'cac';
|
|
2
3
|
import { configName, getConfig, initConfig } from '@tailwindcss-mangle/config';
|
|
3
|
-
import {
|
|
4
|
+
import { T as TailwindcssPatcher, g as getPatchOptions } from './shared/tailwindcss-patch.c6a99ac9.mjs';
|
|
5
|
+
import '@babel/types';
|
|
4
6
|
import 'node:path';
|
|
5
7
|
import 'node:fs';
|
|
8
|
+
import 'semver';
|
|
6
9
|
import 'node:fs/promises';
|
|
7
10
|
import 'resolve';
|
|
8
|
-
import '@babel/types';
|
|
9
11
|
import '@babel/generator';
|
|
10
12
|
import '@babel/traverse';
|
|
11
13
|
import '@babel/parser';
|
|
12
|
-
import 'semver';
|
|
13
14
|
import 'postcss';
|
|
14
15
|
import 'lilconfig';
|
|
15
16
|
import 'jiti';
|
|
@@ -20,9 +21,10 @@ function init() {
|
|
|
20
21
|
}
|
|
21
22
|
const cli = cac();
|
|
22
23
|
cli.command("install", "patch install").action(() => {
|
|
23
|
-
const
|
|
24
|
-
|
|
25
|
-
|
|
24
|
+
const twPatcher = new TailwindcssPatcher({
|
|
25
|
+
patch: getPatchOptions()
|
|
26
|
+
});
|
|
27
|
+
twPatcher.patch();
|
|
26
28
|
});
|
|
27
29
|
cli.command("init").action(async () => {
|
|
28
30
|
await init();
|
|
@@ -33,7 +35,7 @@ cli.command("extract").action(async () => {
|
|
|
33
35
|
if (config) {
|
|
34
36
|
const twPatcher = new TailwindcssPatcher();
|
|
35
37
|
const p = await twPatcher.extract(config.patch);
|
|
36
|
-
console.log(
|
|
38
|
+
console.log(`\u2728 tailwindcss-patch extract success! file path: ${p}`);
|
|
37
39
|
}
|
|
38
40
|
});
|
|
39
41
|
cli.help();
|