File tree Expand file tree Collapse file tree 6 files changed +303
-283
lines changed Expand file tree Collapse file tree 6 files changed +303
-283
lines changed Original file line number Diff line number Diff line change 39
39
"@commitlint/prompt-cli" : " ^19.7.1" ,
40
40
"@commitlint/types" : " ^19.5.0" ,
41
41
"@icebreakers/eslint-config" : " ^1.0.0" ,
42
- "@icebreakers/monorepo" : " ^0.7.2 " ,
42
+ "@icebreakers/monorepo" : " ^0.7.4 " ,
43
43
"@icebreakers/stylelint-config" : " ^1.0.0" ,
44
44
"@rollup/pluginutils" : " ^5.1.4" ,
45
45
"@tailwindcss-mangle/core" : " workspace:*" ,
70
70
"dedent" : " ^1.5.3" ,
71
71
"defu" : " ^6.1.4" ,
72
72
"del" : " ^8.0.0" ,
73
- "eslint" : " ^9.20.0 " ,
73
+ "eslint" : " ^9.20.1 " ,
74
74
"execa" : " ^9.5.2" ,
75
75
"fast-glob" : " ^3.3.3" ,
76
76
"fs-extra" : " ^11.3.0" ,
87
87
"mini-css-extract-plugin" : " ^2.9.2" ,
88
88
"normalize-newline" : " ^4.1.0" ,
89
89
"only-allow" : " ^1.2.1" ,
90
- "pathe" : " ^2.0.2 " ,
90
+ "pathe" : " ^2.0.3 " ,
91
91
"pkg-types" : " ^1.3.1" ,
92
92
"postcss" : " ^8.5.2" ,
93
93
"postcss-loader" : " ^8.1.1" ,
Original file line number Diff line number Diff line change 69
69
"c12" : " ^2.0.2" ,
70
70
"fs-extra" : " ^11.3.0" ,
71
71
"is-css-request" : " ^1.0.1" ,
72
- "pathe" : " ^2.0.2 "
72
+ "pathe" : " ^2.0.3 "
73
73
}
74
74
}
Original file line number Diff line number Diff line change 73
73
"fs-extra" : " ^11.3.0" ,
74
74
"htmlparser2" : " 10.0.0" ,
75
75
"magic-string" : " ^0.30.17" ,
76
- "pathe" : " ^2.0.2 " ,
76
+ "pathe" : " ^2.0.3 " ,
77
77
"postcss" : " ^8.5.2" ,
78
78
"postcss-selector-parser" : " ^7.1.0"
79
79
}
Original file line number Diff line number Diff line change 76
76
"@babel/traverse" : " ^7.26.8" ,
77
77
"@babel/types" : " ^7.26.8" ,
78
78
"@tailwindcss-mangle/config" : " workspace:^" ,
79
- "@tailwindcss/node" : " ^4.0.6" ,
80
- "@tailwindcss/oxide" : " ^4.0.6" ,
81
79
"cac" : " ^6.7.14" ,
82
80
"consola" : " ^3.4.0" ,
83
81
"fs-extra" : " ^11.3.0" ,
84
82
"jiti" : " ^2.4.2" ,
85
83
"lilconfig" : " ^3.1.3" ,
86
- "pathe" : " ^2.0.2 " ,
84
+ "pathe" : " ^2.0.3 " ,
87
85
"postcss" : " ^8.5.2" ,
88
- "semver" : " ^7.7.1"
86
+ "semver" : " ^7.7.1" ,
87
+ "tailwindcss-config" : " ^0.0.0"
89
88
},
90
89
"devDependencies" : {
90
+ "@tailwindcss/node" : " ^4.0.6" ,
91
+ "@tailwindcss/oxide" : " ^4.0.6" ,
91
92
"@tailwindcss/postcss" : " ^4.0.6" ,
92
93
"@tailwindcss/vite" : " ^4.0.6" ,
93
94
"tailwindcss" : " ^4" ,
Original file line number Diff line number Diff line change 1
1
import process from 'node:process'
2
2
import { defu } from '@tailwindcss-mangle/shared'
3
- import { __unstable__loadDesignSystem } from '@tailwindcss/node'
4
- import { Scanner } from '@tailwindcss/oxide'
3
+
4
+ function importNode ( ) {
5
+ return import ( '@tailwindcss/node' )
6
+ }
7
+
8
+ function importOxide ( ) {
9
+ return import ( '@tailwindcss/oxide' )
10
+ }
5
11
6
12
export async function extractRawCandidates (
7
13
content : string ,
8
14
extension : string = 'html' ,
9
15
) : Promise < { rawCandidate : string , start : number , end : number } [ ] > {
16
+ const { Scanner } = await importOxide ( )
10
17
const scanner = new Scanner ( { } )
11
18
12
19
const result = scanner . getCandidatesWithPositions ( { content, extension } )
@@ -32,6 +39,7 @@ export async function extractValidCandidates(options: ExtractValidCandidatesOpti
32
39
css : '@import "tailwindcss";' ,
33
40
base : process . cwd ( ) ,
34
41
} )
42
+ const { __unstable__loadDesignSystem } = await importNode ( )
35
43
const designSystem = await __unstable__loadDesignSystem ( css , { base } )
36
44
37
45
const candidates = await extractRawCandidates ( content )
You can’t perform that action at this time.
0 commit comments