File tree 11 files changed +722
-831
lines changed
unplugin-tailwindcss-mangle
11 files changed +722
-831
lines changed Original file line number Diff line number Diff line change 14
14
"@types/react" : " 18.2.15" ,
15
15
"@types/react-dom" : " 18.2.7" ,
16
16
"autoprefixer" : " 10.4.14" ,
17
- "eslint" : " 8.44 .0" ,
17
+ "eslint" : " 8.45 .0" ,
18
18
"eslint-config-next" : " 13.4.10" ,
19
19
"next" : " 13.4.10" ,
20
20
"postcss" : " 8.4.26" ,
Original file line number Diff line number Diff line change 12
12
"devDependencies" : {
13
13
"@types/node" : " ^20.4.2" ,
14
14
"autoprefixer" : " ^10.4.14" ,
15
- "nuxt" : " ^3.6.2 " ,
15
+ "nuxt" : " ^3.6.3 " ,
16
16
"postcss" : " ^8.4.26" ,
17
17
"tailwindcss" : " ^3.3.3" ,
18
18
"tailwindcss-patch" : " workspace:*" ,
Original file line number Diff line number Diff line change 21
21
"@remix-run/eslint-config" : " ^1.18.1" ,
22
22
"@types/react" : " ^18.2.15" ,
23
23
"@types/react-dom" : " ^18.2.7" ,
24
- "eslint" : " ^8.44 .0" ,
24
+ "eslint" : " ^8.45 .0" ,
25
25
"tailwindcss" : " ^3.3.3" ,
26
26
"tailwindcss-patch" : " workspace:*" ,
27
27
"typescript" : " ^5.1.6" ,
Original file line number Diff line number Diff line change 21
21
"typescript" : " ^5.1.6" ,
22
22
"unplugin-tailwindcss-mangle" : " workspace:*" ,
23
23
"vite" : " ^4.4.4" ,
24
- "vue-tsc" : " ^1.8.4 "
24
+ "vue-tsc" : " ^1.8.5 "
25
25
}
26
26
}
Original file line number Diff line number Diff line change 15
15
"vue-router" : " ^4.2.4"
16
16
},
17
17
"devDependencies" : {
18
- "@typescript-eslint/eslint-plugin" : " ^6.0 .0" ,
19
- "@typescript-eslint/parser" : " ^6.0 .0" ,
18
+ "@typescript-eslint/eslint-plugin" : " ^6.1 .0" ,
19
+ "@typescript-eslint/parser" : " ^6.1 .0" ,
20
20
"@vue/cli-plugin-babel" : " ~5.0.0" ,
21
21
"@vue/cli-plugin-eslint" : " ~5.0.0" ,
22
22
"@vue/cli-plugin-router" : " ~5.0.0" ,
25
25
"@vue/eslint-config-standard" : " ^8.0.1" ,
26
26
"@vue/eslint-config-typescript" : " ^11.0.3" ,
27
27
"autoprefixer" : " ^10.4.14" ,
28
- "eslint" : " ^8.44 .0" ,
28
+ "eslint" : " ^8.45 .0" ,
29
29
"eslint-plugin-import" : " ^2.27.5" ,
30
30
"eslint-plugin-node" : " ^11.1.0" ,
31
31
"eslint-plugin-promise" : " ^6.1.1" ,
Original file line number Diff line number Diff line change 29
29
"@vitest/coverage-v8" : " ^0.33.0" ,
30
30
"bumpp" : " ^9.1.1" ,
31
31
"cross-env" : " ^7.0.3" ,
32
- "eslint" : " ^8.44 .0" ,
33
- "eslint-plugin-unicorn" : " ^47 .0.0" ,
32
+ "eslint" : " ^8.45 .0" ,
33
+ "eslint-plugin-unicorn" : " ^48 .0.0" ,
34
34
"jest" : " ^29.6.1" ,
35
35
"only-allow" : " ^1.1.1" ,
36
36
"prettier" : " ^3.0.0" ,
37
- "rollup" : " ^3.26.2 " ,
37
+ "rollup" : " ^3.26.3 " ,
38
38
"tailwindcss-mangle-core" : " workspace:*" ,
39
39
"tailwindcss-mangle-shared" : " workspace:*" ,
40
40
"tailwindcss-patch" : " workspace:*" ,
Original file line number Diff line number Diff line change 13
13
"build" : " cross-env NODE_ENV=production rollup -c" ,
14
14
"dev:tsc" : " tsc -p tsconfig.json --sourceMap" ,
15
15
"build:tsc" : " tsc -p tsconfig.json" ,
16
- "_test" : " yarn build && jest" ,
17
16
"jest:u" : " jest -u" ,
18
17
"test:dev" : " yarn build && vitest" ,
19
- "test" : " yarn build && jest && vitest run" ,
18
+ "test" : " jest && vitest run" ,
20
19
"coverage" : " vitest run --coverage"
21
20
},
22
21
"keywords" : [
49
48
"type" : " git" ,
50
49
"url" : " git+https://github.com/sonofmagic/tailwindcss-mangle.git"
51
50
}
52
- }
51
+ }
Original file line number Diff line number Diff line change 1
1
import { getCss , getTestCase } from './utils'
2
2
3
3
describe ( 'common usage' , ( ) => {
4
- it ( 'hello-world' , ( ) => {
5
- expect ( getCss ( getTestCase ( 'hello-world.html' ) ) ) . toMatchSnapshot ( )
4
+ it ( 'hello-world' , async ( ) => {
5
+ expect ( await getCss ( getTestCase ( 'hello-world.html' ) ) ) . toMatchSnapshot ( )
6
6
} )
7
7
8
- it ( 'hello-world with js' , ( ) => {
9
- expect ( getCss ( [ getTestCase ( 'hello-world.html' ) , getTestCase ( 'hello-world.js' ) ] ) ) . toMatchSnapshot ( )
8
+ it ( 'hello-world with js' , async ( ) => {
9
+ expect ( await getCss ( [ getTestCase ( 'hello-world.html' ) , getTestCase ( 'hello-world.js' ) ] ) ) . toMatchSnapshot ( )
10
10
} )
11
11
} )
Original file line number Diff line number Diff line change @@ -8,17 +8,18 @@ export function getTestCase(caseName: string) {
8
8
}
9
9
// @tailwind base;
10
10
// @tailwind components;
11
- export function getCss ( raw : string | string [ ] ) {
11
+ export async function getCss ( raw : string | string [ ] ) {
12
12
if ( typeof raw === 'string' ) {
13
13
raw = [ raw ]
14
14
}
15
- return postcss ( [
15
+ const res = await postcss ( [
16
16
tailwindcss ( {
17
17
content : raw . map ( ( x ) => {
18
18
return {
19
19
raw : x
20
20
}
21
21
} )
22
22
} )
23
- ] ) . process ( '@tailwind utilities;' ) . css
23
+ ] ) . process ( '@tailwind utilities;' )
24
+ return res . css
24
25
}
Original file line number Diff line number Diff line change 74
74
"tailwindcss-mangle-core" : " workspace:^" ,
75
75
"tailwindcss-mangle-shared" : " workspace:^" ,
76
76
"tailwindcss-patch" : " workspace:^" ,
77
- "unplugin" : " ^1.3.2 "
77
+ "unplugin" : " ^1.4.0 "
78
78
},
79
79
"publishConfig" : {
80
80
"access" : " public" ,
91
91
"tailwindcss" : " ^3.3.3" ,
92
92
"tslib" : " ^2.6.0" ,
93
93
"vite" : " ^4.4.4" ,
94
- "webpack" : " ^5.88.1 " ,
94
+ "webpack" : " ^5.88.2 " ,
95
95
"webpack-build-utils" : " ^0.0.4"
96
96
},
97
97
"homepage" : " https://github.com/sonofmagic/tailwindcss-mangle" ,
You can’t perform that action at this time.
0 commit comments