tailwindcss-patch 7.1.6 → 8.1.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 +87 -73
- package/dist/chunk-F3S7POWF.js +1389 -0
- package/dist/chunk-IQ26TKX2.mjs +1385 -0
- package/dist/cli.js +131 -38
- package/dist/cli.mjs +132 -38
- package/dist/index.d.mts +243 -87
- package/dist/index.d.ts +243 -87
- package/dist/index.js +6 -2
- package/dist/index.mjs +19 -15
- package/package.json +19 -19
- package/dist/chunk-NS2I2YPX.mjs +0 -1102
- package/dist/chunk-ZKCG5Q25.js +0 -1107
package/dist/index.d.ts
CHANGED
|
@@ -1,45 +1,128 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export { TailwindcssUserConfig, defineConfig } from '@tailwindcss-mangle/config';
|
|
3
|
-
import { Node, Rule } from 'postcss';
|
|
1
|
+
import postcss, { Node, Rule } from 'postcss';
|
|
4
2
|
import { Config } from 'tailwindcss';
|
|
5
|
-
import { PackageInfo } from 'local-pkg';
|
|
6
3
|
import { SourceEntry } from '@tailwindcss/oxide';
|
|
4
|
+
import { PackageResolvingOptions, PackageInfo } from 'local-pkg';
|
|
5
|
+
import { TailwindLocatorOptions, TailwindNextOptions } from '@tailwindcss-mangle/config';
|
|
6
|
+
export { defineConfig } from '@tailwindcss-mangle/config';
|
|
7
7
|
import * as consola from 'consola';
|
|
8
8
|
|
|
9
9
|
type CacheStrategy = 'merge' | 'overwrite';
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
dir?: string;
|
|
10
|
+
interface CacheUserOptions {
|
|
11
|
+
enabled?: boolean;
|
|
13
12
|
cwd?: string;
|
|
13
|
+
dir?: string;
|
|
14
14
|
file?: string;
|
|
15
15
|
strategy?: CacheStrategy;
|
|
16
16
|
}
|
|
17
|
-
interface
|
|
18
|
-
|
|
17
|
+
interface OutputUserOptions {
|
|
18
|
+
enabled?: boolean;
|
|
19
|
+
file?: string;
|
|
20
|
+
format?: 'json' | 'lines';
|
|
21
|
+
pretty?: number | boolean;
|
|
22
|
+
removeUniversalSelector?: boolean;
|
|
23
|
+
}
|
|
24
|
+
interface ExposeContextUserOptions {
|
|
25
|
+
refProperty?: string;
|
|
26
|
+
}
|
|
27
|
+
interface ExtendLengthUnitsUserOptions extends Partial<ILengthUnitsPatchOptions> {
|
|
28
|
+
enabled?: boolean;
|
|
19
29
|
}
|
|
20
|
-
interface
|
|
30
|
+
interface FeatureUserOptions {
|
|
31
|
+
exposeContext?: boolean | ExposeContextUserOptions;
|
|
32
|
+
extendLengthUnits?: false | ExtendLengthUnitsUserOptions;
|
|
33
|
+
}
|
|
34
|
+
interface TailwindConfigUserOptions {
|
|
35
|
+
config?: string;
|
|
36
|
+
cwd?: string;
|
|
37
|
+
postcssPlugin?: string;
|
|
38
|
+
}
|
|
39
|
+
interface TailwindV4UserOptions {
|
|
40
|
+
base?: string;
|
|
41
|
+
css?: string;
|
|
42
|
+
cssEntries?: string[];
|
|
43
|
+
sources?: SourceEntry[];
|
|
44
|
+
}
|
|
45
|
+
interface TailwindUserOptions extends TailwindConfigUserOptions {
|
|
46
|
+
/**
|
|
47
|
+
* Optional hint for picking the patch strategy.
|
|
48
|
+
* When omitted we infer from the installed Tailwind CSS package version.
|
|
49
|
+
*/
|
|
50
|
+
version?: 2 | 3 | 4;
|
|
51
|
+
packageName?: string;
|
|
52
|
+
resolve?: PackageResolvingOptions;
|
|
53
|
+
v2?: TailwindConfigUserOptions;
|
|
54
|
+
v3?: TailwindConfigUserOptions;
|
|
55
|
+
v4?: TailwindV4UserOptions;
|
|
56
|
+
}
|
|
57
|
+
interface TailwindcssPatchOptions {
|
|
58
|
+
/**
|
|
59
|
+
* Base directory used when resolving Tailwind resources.
|
|
60
|
+
* Defaults to `process.cwd()`.
|
|
61
|
+
*/
|
|
62
|
+
cwd?: string;
|
|
21
63
|
overwrite?: boolean;
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
applyPatches?: {
|
|
25
|
-
exportContext?: boolean;
|
|
26
|
-
extendLengthUnits?: boolean | ILengthUnitsPatchOptions;
|
|
27
|
-
};
|
|
64
|
+
tailwind?: TailwindUserOptions;
|
|
65
|
+
features?: FeatureUserOptions;
|
|
28
66
|
filter?: (className: string) => boolean;
|
|
29
|
-
|
|
67
|
+
cache?: boolean | CacheUserOptions;
|
|
68
|
+
output?: OutputUserOptions;
|
|
69
|
+
}
|
|
70
|
+
interface NormalizedOutputOptions {
|
|
71
|
+
enabled: boolean;
|
|
72
|
+
file?: string;
|
|
73
|
+
format: 'json' | 'lines';
|
|
74
|
+
pretty: number | false;
|
|
75
|
+
removeUniversalSelector: boolean;
|
|
76
|
+
}
|
|
77
|
+
interface NormalizedCacheOptions {
|
|
78
|
+
enabled: boolean;
|
|
79
|
+
cwd: string;
|
|
80
|
+
dir: string;
|
|
81
|
+
file: string;
|
|
82
|
+
path: string;
|
|
83
|
+
strategy: CacheStrategy;
|
|
84
|
+
}
|
|
85
|
+
interface NormalizedExposeContextOptions {
|
|
86
|
+
enabled: boolean;
|
|
87
|
+
refProperty: string;
|
|
88
|
+
}
|
|
89
|
+
interface NormalizedExtendLengthUnitsOptions extends ILengthUnitsPatchOptions {
|
|
90
|
+
enabled: boolean;
|
|
91
|
+
}
|
|
92
|
+
interface NormalizedTailwindV4Options {
|
|
93
|
+
base: string;
|
|
94
|
+
css?: string;
|
|
95
|
+
cssEntries: string[];
|
|
96
|
+
sources: SourceEntry[];
|
|
30
97
|
}
|
|
31
|
-
interface
|
|
32
|
-
|
|
98
|
+
interface NormalizedTailwindConfigOptions extends TailwindConfigUserOptions {
|
|
99
|
+
packageName: string;
|
|
100
|
+
versionHint?: 2 | 3 | 4;
|
|
101
|
+
resolve?: PackageResolvingOptions;
|
|
102
|
+
v2?: TailwindConfigUserOptions;
|
|
103
|
+
v3?: TailwindConfigUserOptions;
|
|
104
|
+
v4?: NormalizedTailwindV4Options;
|
|
33
105
|
}
|
|
34
|
-
interface
|
|
35
|
-
|
|
36
|
-
|
|
106
|
+
interface NormalizedFeatureOptions {
|
|
107
|
+
exposeContext: NormalizedExposeContextOptions;
|
|
108
|
+
extendLengthUnits: NormalizedExtendLengthUnitsOptions | null;
|
|
37
109
|
}
|
|
38
|
-
|
|
110
|
+
interface NormalizedTailwindcssPatchOptions {
|
|
111
|
+
projectRoot: string;
|
|
112
|
+
overwrite: boolean;
|
|
113
|
+
tailwind: NormalizedTailwindConfigOptions;
|
|
114
|
+
features: NormalizedFeatureOptions;
|
|
115
|
+
output: NormalizedOutputOptions;
|
|
116
|
+
cache: NormalizedCacheOptions;
|
|
117
|
+
filter: (className: string) => boolean;
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
type TailwindcssClassCacheEntry = Rule | {
|
|
39
121
|
layer: string;
|
|
40
122
|
options: Record<string, any>;
|
|
41
123
|
sort: Record<string, any>;
|
|
42
|
-
}
|
|
124
|
+
};
|
|
125
|
+
type TailwindcssClassCache = Map<string, TailwindcssClassCacheEntry[]>;
|
|
43
126
|
interface TailwindcssRuntimeContext {
|
|
44
127
|
applyClassCache: Map<any, any>;
|
|
45
128
|
candidateRuleCache: Map<string, Set<[
|
|
@@ -58,11 +141,11 @@ interface TailwindcssRuntimeContext {
|
|
|
58
141
|
changedContent: any[];
|
|
59
142
|
classCache: TailwindcssClassCache;
|
|
60
143
|
disposables: any[];
|
|
61
|
-
getClassList:
|
|
62
|
-
getClassOrder:
|
|
63
|
-
getVariants:
|
|
64
|
-
markInvalidUtilityCandidate:
|
|
65
|
-
markInvalidUtilityNode:
|
|
144
|
+
getClassList: (...args: any[]) => any;
|
|
145
|
+
getClassOrder: (...args: any[]) => any;
|
|
146
|
+
getVariants: (...args: any[]) => any;
|
|
147
|
+
markInvalidUtilityCandidate: (...args: any[]) => any;
|
|
148
|
+
markInvalidUtilityNode: (...args: any[]) => any;
|
|
66
149
|
notClassCache: Set<string>;
|
|
67
150
|
offsets: {
|
|
68
151
|
layerPositions: object;
|
|
@@ -75,12 +158,19 @@ interface TailwindcssRuntimeContext {
|
|
|
75
158
|
stylesheetCache: Record<string, Set<any>>;
|
|
76
159
|
tailwindConfig: Config;
|
|
77
160
|
userConfigPath: string | null;
|
|
78
|
-
variantMap: Map<string, [[object,
|
|
161
|
+
variantMap: Map<string, [[object, (...args: any[]) => unknown]]>;
|
|
79
162
|
variantOptions: Map<string, object>;
|
|
80
163
|
}
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
164
|
+
interface ExtractResult {
|
|
165
|
+
classList: string[];
|
|
166
|
+
classSet: Set<string>;
|
|
167
|
+
filename?: string;
|
|
168
|
+
}
|
|
169
|
+
interface TailwindPatchRuntime {
|
|
170
|
+
options: NormalizedTailwindcssPatchOptions;
|
|
171
|
+
majorVersion: 2 | 3 | 4;
|
|
172
|
+
}
|
|
173
|
+
|
|
84
174
|
interface ILengthUnitsPatchOptions {
|
|
85
175
|
units: string[];
|
|
86
176
|
lengthUnitsFilePath?: string;
|
|
@@ -89,17 +179,79 @@ interface ILengthUnitsPatchOptions {
|
|
|
89
179
|
destPath?: string;
|
|
90
180
|
}
|
|
91
181
|
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
182
|
+
interface ExposeContextPatchParams {
|
|
183
|
+
rootDir: string;
|
|
184
|
+
refProperty: string;
|
|
185
|
+
overwrite: boolean;
|
|
186
|
+
majorVersion: 2 | 3;
|
|
187
|
+
}
|
|
188
|
+
interface ExposeContextPatchResult {
|
|
189
|
+
applied: boolean;
|
|
190
|
+
files: Record<string, string>;
|
|
191
|
+
}
|
|
192
|
+
declare function applyExposeContextPatch(params: ExposeContextPatchParams): ExposeContextPatchResult;
|
|
193
|
+
|
|
194
|
+
declare function applyExtendLengthUnitsPatchV3(rootDir: string, options: NormalizedExtendLengthUnitsOptions): {
|
|
195
|
+
changed: boolean;
|
|
196
|
+
code: undefined;
|
|
197
|
+
} | {
|
|
198
|
+
changed: boolean;
|
|
199
|
+
code: string;
|
|
200
|
+
};
|
|
201
|
+
interface V4FilePatch {
|
|
202
|
+
file: string;
|
|
203
|
+
code: string;
|
|
204
|
+
hasPatched: boolean;
|
|
205
|
+
}
|
|
206
|
+
interface V4Candidate extends V4FilePatch {
|
|
207
|
+
match: RegExpExecArray;
|
|
208
|
+
}
|
|
209
|
+
declare function applyExtendLengthUnitsPatchV4(rootDir: string, options: NormalizedExtendLengthUnitsOptions): {
|
|
210
|
+
changed: boolean;
|
|
211
|
+
files: V4Candidate[];
|
|
212
|
+
};
|
|
213
|
+
|
|
214
|
+
interface PatchRunnerResult {
|
|
215
|
+
exposeContext?: ReturnType<typeof applyExposeContextPatch>;
|
|
216
|
+
extendLengthUnits?: ReturnType<typeof applyExtendLengthUnitsPatchV3> | ReturnType<typeof applyExtendLengthUnitsPatchV4>;
|
|
217
|
+
}
|
|
218
|
+
|
|
219
|
+
interface LegacyCacheOptions {
|
|
220
|
+
dir?: string;
|
|
221
|
+
cwd?: string;
|
|
222
|
+
file?: string;
|
|
223
|
+
strategy?: 'merge' | 'overwrite';
|
|
224
|
+
enabled?: boolean;
|
|
225
|
+
}
|
|
226
|
+
interface LegacyOutputOptions {
|
|
227
|
+
filename?: string;
|
|
228
|
+
loose?: boolean;
|
|
229
|
+
removeUniversalSelector?: boolean;
|
|
230
|
+
}
|
|
231
|
+
interface LegacyTailwindcssOptions {
|
|
232
|
+
version?: 2 | 3 | 4;
|
|
233
|
+
v2?: TailwindLocatorOptions;
|
|
234
|
+
v3?: TailwindLocatorOptions;
|
|
235
|
+
v4?: TailwindNextOptions;
|
|
236
|
+
config?: string;
|
|
237
|
+
cwd?: string;
|
|
238
|
+
}
|
|
239
|
+
interface LegacyPatchOptions {
|
|
240
|
+
packageName?: string;
|
|
241
|
+
output?: LegacyOutputOptions;
|
|
242
|
+
tailwindcss?: LegacyTailwindcssOptions;
|
|
243
|
+
overwrite?: boolean;
|
|
244
|
+
applyPatches?: {
|
|
245
|
+
exportContext?: boolean;
|
|
246
|
+
extendLengthUnits?: boolean | ILengthUnitsPatchOptions;
|
|
100
247
|
};
|
|
101
|
-
|
|
102
|
-
|
|
248
|
+
filter?: (className: string) => boolean;
|
|
249
|
+
cwd?: string;
|
|
250
|
+
resolve?: PackageResolvingOptions;
|
|
251
|
+
}
|
|
252
|
+
interface LegacyTailwindcssPatcherOptions {
|
|
253
|
+
cache?: LegacyCacheOptions | boolean;
|
|
254
|
+
patch?: LegacyPatchOptions;
|
|
103
255
|
}
|
|
104
256
|
|
|
105
257
|
interface ExtractValidCandidatesOption {
|
|
@@ -108,59 +260,63 @@ interface ExtractValidCandidatesOption {
|
|
|
108
260
|
css?: string;
|
|
109
261
|
cwd?: string;
|
|
110
262
|
}
|
|
263
|
+
declare function extractRawCandidatesWithPositions(content: string, extension?: string): Promise<{
|
|
264
|
+
rawCandidate: string;
|
|
265
|
+
start: number;
|
|
266
|
+
end: number;
|
|
267
|
+
}[]>;
|
|
268
|
+
declare function extractRawCandidates(sources?: SourceEntry[]): Promise<string[]>;
|
|
111
269
|
declare function extractValidCandidates(options?: ExtractValidCandidatesOption): Promise<string[]>;
|
|
112
270
|
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
}
|
|
271
|
+
type TailwindMajorVersion = 2 | 3 | 4;
|
|
272
|
+
type TailwindcssPatcherInitOptions = TailwindcssPatchOptions | LegacyTailwindcssPatcherOptions;
|
|
116
273
|
declare class TailwindcssPatcher {
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
majorVersion?: number;
|
|
124
|
-
filter?: (className: string) => boolean;
|
|
125
|
-
constructor(options?: TailwindcssPatcherOptions);
|
|
126
|
-
setCache(set: Set<string>): string | undefined;
|
|
127
|
-
getCache(): Set<string>;
|
|
274
|
+
readonly options: NormalizedTailwindcssPatchOptions;
|
|
275
|
+
readonly packageInfo: PackageInfo;
|
|
276
|
+
readonly majorVersion: TailwindMajorVersion;
|
|
277
|
+
private readonly cacheStore;
|
|
278
|
+
constructor(options?: TailwindcssPatcherInitOptions);
|
|
279
|
+
patch(): Promise<PatchRunnerResult>;
|
|
128
280
|
getContexts(): TailwindcssRuntimeContext[];
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
*/
|
|
281
|
+
private runTailwindBuildIfNeeded;
|
|
282
|
+
private collectClassSet;
|
|
283
|
+
private collectClassSetSync;
|
|
284
|
+
private mergeWithCache;
|
|
285
|
+
private mergeWithCacheSync;
|
|
135
286
|
getClassSet(): Promise<Set<string>>;
|
|
136
|
-
|
|
137
|
-
extract(options?:
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
filename?: string;
|
|
141
|
-
} | undefined>;
|
|
287
|
+
getClassSetSync(): Set<string>;
|
|
288
|
+
extract(options?: {
|
|
289
|
+
write?: boolean;
|
|
290
|
+
}): Promise<ExtractResult>;
|
|
142
291
|
extractValidCandidates: typeof extractValidCandidates;
|
|
143
292
|
}
|
|
144
293
|
|
|
145
|
-
declare
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
file: string;
|
|
155
|
-
matches: RegExpMatchArray;
|
|
294
|
+
declare class CacheStore {
|
|
295
|
+
private readonly options;
|
|
296
|
+
constructor(options: NormalizedCacheOptions);
|
|
297
|
+
private ensureDir;
|
|
298
|
+
private ensureDirSync;
|
|
299
|
+
write(data: Set<string>): Promise<string | undefined>;
|
|
300
|
+
writeSync(data: Set<string>): string | undefined;
|
|
301
|
+
read(): Promise<Set<string>>;
|
|
302
|
+
readSync(): Set<string>;
|
|
156
303
|
}
|
|
157
|
-
declare function monkeyPatchForSupportingCustomUnitV4(rootDir: string, options?: Partial<ILengthUnitsPatchOptions>): {
|
|
158
|
-
files: V4GuessFile[];
|
|
159
|
-
};
|
|
160
|
-
|
|
161
|
-
declare function internalPatch(pkgJsonPath: PackageInfo, options: InternalPatchOptions): any;
|
|
162
|
-
declare function internalPatch(pkgJsonPath: string, options: InternalPatchOptions): any;
|
|
163
304
|
|
|
164
305
|
declare const logger: consola.ConsolaInstance;
|
|
165
306
|
|
|
166
|
-
|
|
307
|
+
declare function normalizeOptions(options?: TailwindcssPatchOptions): NormalizedTailwindcssPatchOptions;
|
|
308
|
+
|
|
309
|
+
declare function collectClassesFromContexts(contexts: TailwindcssRuntimeContext[], filter: (className: string) => boolean): Set<string>;
|
|
310
|
+
declare function collectClassesFromTailwindV4(options: NormalizedTailwindcssPatchOptions): Promise<Set<string>>;
|
|
311
|
+
|
|
312
|
+
declare function loadRuntimeContexts(packageInfo: PackageInfo, majorVersion: 2 | 3 | 4, refProperty: string): TailwindcssRuntimeContext[];
|
|
313
|
+
|
|
314
|
+
interface TailwindBuildOptions {
|
|
315
|
+
cwd: string;
|
|
316
|
+
config?: string;
|
|
317
|
+
majorVersion: 2 | 3 | 4;
|
|
318
|
+
postcssPlugin?: string;
|
|
319
|
+
}
|
|
320
|
+
declare function runTailwindBuild(options: TailwindBuildOptions): Promise<postcss.Result<postcss.Root>>;
|
|
321
|
+
|
|
322
|
+
export { CacheStore, type CacheStrategy, type ExtractResult, type ILengthUnitsPatchOptions, type NormalizedTailwindcssPatchOptions, type TailwindPatchRuntime, type TailwindcssClassCache, type TailwindcssPatchOptions, TailwindcssPatcher, type TailwindcssRuntimeContext, collectClassesFromContexts, collectClassesFromTailwindV4, extractRawCandidates, extractRawCandidatesWithPositions, extractValidCandidates, loadRuntimeContexts, logger, normalizeOptions, runTailwindBuild };
|
package/dist/index.js
CHANGED
|
@@ -8,7 +8,9 @@
|
|
|
8
8
|
|
|
9
9
|
|
|
10
10
|
|
|
11
|
-
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
var _chunkF3S7POWFjs = require('./chunk-F3S7POWF.js');
|
|
12
14
|
|
|
13
15
|
// src/index.ts
|
|
14
16
|
var _config = require('@tailwindcss-mangle/config');
|
|
@@ -23,4 +25,6 @@ var _config = require('@tailwindcss-mangle/config');
|
|
|
23
25
|
|
|
24
26
|
|
|
25
27
|
|
|
26
|
-
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
exports.CacheStore = _chunkF3S7POWFjs.CacheStore; exports.TailwindcssPatcher = _chunkF3S7POWFjs.TailwindcssPatcher; exports.collectClassesFromContexts = _chunkF3S7POWFjs.collectClassesFromContexts; exports.collectClassesFromTailwindV4 = _chunkF3S7POWFjs.collectClassesFromTailwindV4; exports.defineConfig = _config.defineConfig; exports.extractRawCandidates = _chunkF3S7POWFjs.extractRawCandidates; exports.extractRawCandidatesWithPositions = _chunkF3S7POWFjs.extractRawCandidatesWithPositions; exports.extractValidCandidates = _chunkF3S7POWFjs.extractValidCandidates; exports.loadRuntimeContexts = _chunkF3S7POWFjs.loadRuntimeContexts; exports.logger = _chunkF3S7POWFjs.logger_default; exports.normalizeOptions = _chunkF3S7POWFjs.normalizeOptions; exports.runTailwindBuild = _chunkF3S7POWFjs.runTailwindBuild;
|
package/dist/index.mjs
CHANGED
|
@@ -1,26 +1,30 @@
|
|
|
1
1
|
import {
|
|
2
|
-
|
|
2
|
+
CacheStore,
|
|
3
3
|
TailwindcssPatcher,
|
|
4
|
-
|
|
5
|
-
|
|
4
|
+
collectClassesFromContexts,
|
|
5
|
+
collectClassesFromTailwindV4,
|
|
6
|
+
extractRawCandidates,
|
|
7
|
+
extractRawCandidatesWithPositions,
|
|
8
|
+
extractValidCandidates,
|
|
9
|
+
loadRuntimeContexts,
|
|
6
10
|
logger_default,
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
monkeyPatchForSupportingCustomUnitV4
|
|
11
|
-
} from "./chunk-NS2I2YPX.mjs";
|
|
11
|
+
normalizeOptions,
|
|
12
|
+
runTailwindBuild
|
|
13
|
+
} from "./chunk-IQ26TKX2.mjs";
|
|
12
14
|
|
|
13
15
|
// src/index.ts
|
|
14
16
|
import { defineConfig } from "@tailwindcss-mangle/config";
|
|
15
17
|
export {
|
|
16
|
-
|
|
18
|
+
CacheStore,
|
|
17
19
|
TailwindcssPatcher,
|
|
20
|
+
collectClassesFromContexts,
|
|
21
|
+
collectClassesFromTailwindV4,
|
|
18
22
|
defineConfig,
|
|
19
|
-
|
|
20
|
-
|
|
23
|
+
extractRawCandidates,
|
|
24
|
+
extractRawCandidatesWithPositions,
|
|
25
|
+
extractValidCandidates,
|
|
26
|
+
loadRuntimeContexts,
|
|
21
27
|
logger_default as logger,
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
monkeyPatchForSupportingCustomUnitV3,
|
|
25
|
-
monkeyPatchForSupportingCustomUnitV4
|
|
28
|
+
normalizeOptions,
|
|
29
|
+
runTailwindBuild
|
|
26
30
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "tailwindcss-patch",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "8.1.0",
|
|
4
4
|
"description": "patch tailwindcss for exposing context and extract classes",
|
|
5
5
|
"author": "ice breaker <1324318532@qq.com>",
|
|
6
6
|
"license": "MIT",
|
|
@@ -50,36 +50,36 @@
|
|
|
50
50
|
}
|
|
51
51
|
},
|
|
52
52
|
"dependencies": {
|
|
53
|
-
"@babel/generator": "^7.28.
|
|
54
|
-
"@babel/parser": "^7.28.
|
|
55
|
-
"@babel/traverse": "^7.28.
|
|
56
|
-
"@babel/types": "^7.28.
|
|
57
|
-
"@tailwindcss/node": "^4.1.
|
|
53
|
+
"@babel/generator": "^7.28.5",
|
|
54
|
+
"@babel/parser": "^7.28.5",
|
|
55
|
+
"@babel/traverse": "^7.28.5",
|
|
56
|
+
"@babel/types": "^7.28.5",
|
|
57
|
+
"@tailwindcss/node": "^4.1.16",
|
|
58
58
|
"cac": "^6.7.14",
|
|
59
59
|
"consola": "^3.4.2",
|
|
60
60
|
"fs-extra": "^11.3.2",
|
|
61
61
|
"local-pkg": "^1.1.2",
|
|
62
62
|
"pathe": "^2.0.3",
|
|
63
63
|
"postcss": "^8.5.6",
|
|
64
|
-
"semver": "^7.7.
|
|
65
|
-
"tailwindcss-config": "^1.1.
|
|
66
|
-
"@tailwindcss-mangle/config": "^
|
|
64
|
+
"semver": "^7.7.3",
|
|
65
|
+
"tailwindcss-config": "^1.1.2",
|
|
66
|
+
"@tailwindcss-mangle/config": "^6.0.0"
|
|
67
67
|
},
|
|
68
68
|
"devDependencies": {
|
|
69
|
-
"@tailwindcss/oxide": "^4.1.
|
|
70
|
-
"@tailwindcss/postcss": "^4.1.
|
|
71
|
-
"@tailwindcss/vite": "^4.1.
|
|
72
|
-
"tailwindcss": "^4.1.
|
|
73
|
-
"tailwindcss-3": "npm:tailwindcss@^3.4.
|
|
74
|
-
"tailwindcss-4": "npm:tailwindcss@^4.1.
|
|
69
|
+
"@tailwindcss/oxide": "^4.1.16",
|
|
70
|
+
"@tailwindcss/postcss": "^4.1.16",
|
|
71
|
+
"@tailwindcss/vite": "^4.1.16",
|
|
72
|
+
"tailwindcss": "^4.1.16",
|
|
73
|
+
"tailwindcss-3": "npm:tailwindcss@^3.4.18",
|
|
74
|
+
"tailwindcss-4": "npm:tailwindcss@^4.1.16"
|
|
75
75
|
},
|
|
76
76
|
"scripts": {
|
|
77
77
|
"dev": "tsup --watch --sourcemap",
|
|
78
78
|
"build": "tsup",
|
|
79
|
-
"test": "
|
|
79
|
+
"test": "vitest run",
|
|
80
80
|
"test:dev": "vitest",
|
|
81
|
-
"patch": "tsx dev/bin.
|
|
82
|
-
"r0": "tsx dev/bin.
|
|
83
|
-
"r1": "tsx dev/bin.
|
|
81
|
+
"patch": "tsx dev/bin.ts install",
|
|
82
|
+
"r0": "tsx dev/bin.ts extract",
|
|
83
|
+
"r1": "tsx dev/bin.ts extract --css index.css"
|
|
84
84
|
}
|
|
85
85
|
}
|