Skip to content

Commit 846505a

Browse files
committed
chore: format package json
1 parent 84f2402 commit 846505a

File tree

5 files changed

+77
-86
lines changed

5 files changed

+77
-86
lines changed

packages/config/package.json

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,32 @@
22
"name": "@tailwindcss-mangle/config",
33
"version": "2.2.2",
44
"description": "The config and load function of tailwindcss-mangle",
5+
"author": "SonOfMagic <[email protected]>",
6+
"license": "MIT",
7+
"homepage": "https://github.com/sonofmagic/tailwindcss-mangle",
8+
"repository": {
9+
"type": "git",
10+
"url": "git+https://github.com/sonofmagic/tailwindcss-mangle.git"
11+
},
12+
"keywords": [
13+
"tailwindcss",
14+
"mangle",
15+
"patch",
16+
"core",
17+
"mangle",
18+
"shared",
19+
"utils"
20+
],
521
"exports": {
622
".": {
723
"types": "./dist/index.d.ts",
824
"import": "./dist/index.mjs",
925
"require": "./dist/index.cjs"
1026
}
1127
},
28+
"main": "./dist/index.cjs",
29+
"module": "./dist/index.mjs",
30+
"types": "./dist/index.d.ts",
1231
"typesVersions": {
1332
"*": {
1433
"*": [
@@ -17,9 +36,6 @@
1736
]
1837
}
1938
},
20-
"main": "./dist/index.cjs",
21-
"module": "./dist/index.mjs",
22-
"types": "./dist/index.d.ts",
2339
"files": [
2440
"dist"
2541
],
@@ -29,17 +45,6 @@
2945
"test": "vitest run --coverage.enabled",
3046
"test:dev": "vitest"
3147
},
32-
"keywords": [
33-
"tailwindcss",
34-
"mangle",
35-
"patch",
36-
"core",
37-
"mangle",
38-
"shared",
39-
"utils"
40-
],
41-
"author": "SonOfMagic <[email protected]>",
42-
"license": "MIT",
4348
"publishConfig": {
4449
"access": "public",
4550
"registry": "https://registry.npmjs.org/"
@@ -48,10 +53,5 @@
4853
"@tailwindcss-mangle/shared": "workspace:^",
4954
"c12": "^1.11.1",
5055
"dedent": "^1.5.3"
51-
},
52-
"homepage": "https://github.com/sonofmagic/tailwindcss-mangle",
53-
"repository": {
54-
"type": "git",
55-
"url": "git+https://github.com/sonofmagic/tailwindcss-mangle.git"
5656
}
5757
}

packages/shared/package.json

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,31 @@
22
"name": "@tailwindcss-mangle/shared",
33
"version": "2.2.2",
44
"description": "The shared utils of tailwindcss-mangle",
5+
"author": "SonOfMagic <[email protected]>",
6+
"license": "MIT",
7+
"homepage": "https://github.com/sonofmagic/tailwindcss-mangle",
8+
"repository": {
9+
"type": "git",
10+
"url": "git+https://github.com/sonofmagic/tailwindcss-mangle.git"
11+
},
12+
"keywords": [
13+
"tailwindcss",
14+
"patch",
15+
"core",
16+
"mangle",
17+
"shared",
18+
"utils"
19+
],
520
"exports": {
621
".": {
722
"types": "./dist/index.d.ts",
823
"import": "./dist/index.mjs",
924
"require": "./dist/index.cjs"
1025
}
1126
},
27+
"main": "./dist/index.cjs",
28+
"module": "./dist/index.mjs",
29+
"types": "./dist/index.d.ts",
1230
"typesVersions": {
1331
"*": {
1432
"*": [
@@ -17,9 +35,6 @@
1735
]
1836
}
1937
},
20-
"main": "./dist/index.cjs",
21-
"module": "./dist/index.mjs",
22-
"types": "./dist/index.d.ts",
2338
"files": [
2439
"dist"
2540
],
@@ -29,25 +44,10 @@
2944
"test": "vitest run --coverage.enabled",
3045
"test:dev": "vitest"
3146
},
32-
"keywords": [
33-
"tailwindcss",
34-
"patch",
35-
"core",
36-
"mangle",
37-
"shared",
38-
"utils"
39-
],
40-
"author": "SonOfMagic <[email protected]>",
41-
"license": "MIT",
4247
"publishConfig": {
4348
"access": "public",
4449
"registry": "https://registry.npmjs.org/"
4550
},
4651
"dependencies": {},
47-
"devDependencies": {},
48-
"homepage": "https://github.com/sonofmagic/tailwindcss-mangle",
49-
"repository": {
50-
"type": "git",
51-
"url": "git+https://github.com/sonofmagic/tailwindcss-mangle.git"
52-
}
52+
"devDependencies": {}
5353
}

packages/unplugin-tailwind-merge/package.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,13 @@
33
"version": "0.0.0",
44
"private": true,
55
"description": "To merge Tailwind CSS classes at compile time!",
6-
"main": "index.js",
7-
"scripts": {},
8-
"keywords": [],
96
"author": "",
107
"license": "MIT",
8+
"keywords": [],
9+
"main": "index.js",
10+
"scripts": {},
1111
"dependencies": {
1212
"tailwind-merge": "^2.3.0",
1313
"unplugin": "^1.10.1"
1414
}
15-
}
15+
}

packages/unplugin-tailwindcss-mangle/package.json

Lines changed: 35 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -2,47 +2,62 @@
22
"name": "unplugin-tailwindcss-mangle",
33
"version": "2.2.2",
44
"description": "mangle tailwindcss utilities class plugin. support vite and webpack!",
5-
"main": "./dist/index.cjs",
6-
"module": "./dist/index.mjs",
7-
"types": "./dist/index.d.ts",
5+
"author": "SonOfMagic <[email protected]>",
6+
"license": "MIT",
7+
"homepage": "https://github.com/sonofmagic/tailwindcss-mangle",
8+
"repository": {
9+
"type": "git",
10+
"url": "git+https://github.com/sonofmagic/tailwindcss-mangle.git"
11+
},
12+
"keywords": [
13+
"tailwindcss",
14+
"utilities",
15+
"mangle",
16+
"class",
17+
"obfuscator",
18+
"obfuscation"
19+
],
820
"exports": {
921
".": {
1022
"types": "./dist/index.d.ts",
11-
"require": "./dist/index.cjs",
12-
"import": "./dist/index.mjs"
23+
"import": "./dist/index.mjs",
24+
"require": "./dist/index.cjs"
1325
},
1426
"./vite": {
1527
"types": "./dist/vite.d.ts",
16-
"require": "./dist/vite.cjs",
17-
"import": "./dist/vite.mjs"
28+
"import": "./dist/vite.mjs",
29+
"require": "./dist/vite.cjs"
1830
},
1931
"./webpack": {
2032
"types": "./dist/webpack.d.ts",
21-
"require": "./dist/webpack.cjs",
22-
"import": "./dist/webpack.mjs"
33+
"import": "./dist/webpack.mjs",
34+
"require": "./dist/webpack.cjs"
2335
},
2436
"./rollup": {
2537
"types": "./dist/rollup.d.ts",
26-
"require": "./dist/rollup.cjs",
27-
"import": "./dist/rollup.mjs"
38+
"import": "./dist/rollup.mjs",
39+
"require": "./dist/rollup.cjs"
2840
},
2941
"./esbuild": {
3042
"types": "./dist/esbuild.d.ts",
31-
"require": "./dist/esbuild.cjs",
32-
"import": "./dist/esbuild.mjs"
43+
"import": "./dist/esbuild.mjs",
44+
"require": "./dist/esbuild.cjs"
3345
},
3446
"./nuxt": {
3547
"types": "./dist/nuxt.d.ts",
36-
"require": "./dist/nuxt.cjs",
37-
"import": "./dist/nuxt.mjs"
48+
"import": "./dist/nuxt.mjs",
49+
"require": "./dist/nuxt.cjs"
3850
},
3951
"./utils": {
4052
"types": "./dist/utils.d.ts",
41-
"require": "./dist/utils.cjs",
42-
"import": "./dist/utils.mjs"
53+
"import": "./dist/utils.mjs",
54+
"require": "./dist/utils.cjs"
4355
},
4456
"./*": "./*"
4557
},
58+
"main": "./dist/index.cjs",
59+
"module": "./dist/index.mjs",
60+
"types": "./dist/index.d.ts",
4661
"typesVersions": {
4762
"*": {
4863
"*": [
@@ -51,25 +66,15 @@
5166
]
5267
}
5368
},
69+
"files": [
70+
"dist"
71+
],
5472
"scripts": {
5573
"dev": "unbuild --sourcemap",
5674
"build": "unbuild",
5775
"test": "vitest run --coverage.enabled",
5876
"test:dev": "vitest"
5977
},
60-
"files": [
61-
"dist"
62-
],
63-
"keywords": [
64-
"tailwindcss",
65-
"utilities",
66-
"mangle",
67-
"class",
68-
"obfuscator",
69-
"obfuscation"
70-
],
71-
"author": "SonOfMagic <[email protected]>",
72-
"license": "MIT",
7378
"dependencies": {
7479
"@tailwindcss-mangle/config": "workspace:^",
7580
"@tailwindcss-mangle/core": "workspace:^",
@@ -95,10 +100,5 @@
95100
"vite": "^5.3.1",
96101
"webpack": "^5.92.0",
97102
"webpack-build-utils": "^0.0.7"
98-
},
99-
"homepage": "https://github.com/sonofmagic/tailwindcss-mangle",
100-
"repository": {
101-
"type": "git",
102-
"url": "git+https://github.com/sonofmagic/tailwindcss-mangle.git"
103103
}
104104
}

packages/unplugin-tailwindcss-mangle/src/core/plugin.ts

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -25,26 +25,22 @@ export const unplugin = createUnplugin((options?: MangleUserConfig) => {
2525
},
2626
transform(code, id) {
2727
const s = new MagicString(code)
28-
const replaceMap = ctx.getReplaceMap()
2928
// 直接忽略 css 文件,因为此时 tailwindcss 还没有展开
3029
return /\.[jt]sx?$/.test(id)
3130
? preProcessJs({
3231
code: s,
33-
replaceMap,
3432
ctx,
3533
id,
3634
})
3735
: preProcessRawCode({
3836
code,
3937
ctx,
40-
replaceMap,
4138
id,
4239
})
4340
},
4441
vite: {
4542
generateBundle: {
4643
async handler(options, bundle) {
47-
const replaceMap = ctx.getReplaceMap()
4844
const groupedEntries = getGroupedEntries(Object.entries(bundle))
4945

5046
if (Array.isArray(groupedEntries.css) && groupedEntries.css.length > 0) {
@@ -53,7 +49,6 @@ export const unplugin = createUnplugin((options?: MangleUserConfig) => {
5349

5450
const { css } = await cssHandler(cssSource.source.toString(), {
5551
file,
56-
replaceMap,
5752
ctx,
5853
})
5954
cssSource.source = css
@@ -73,15 +68,13 @@ export const unplugin = createUnplugin((options?: MangleUserConfig) => {
7368
stage: Compilation.PROCESS_ASSETS_STAGE_SUMMARIZE,
7469
},
7570
async (assets) => {
76-
const replaceMap = ctx.getReplaceMap()
7771
const groupedEntries = getGroupedEntries(Object.entries(assets))
7872

7973
if (groupedEntries.js.length > 0) {
8074
for (let i = 0; i < groupedEntries.js.length; i++) {
8175
const [file, chunk] = groupedEntries.js[i]
8276

8377
const code = jsHandler(chunk.source().toString(), {
84-
replaceMap,
8578
ctx,
8679
}).code
8780
if (code) {
@@ -96,7 +89,6 @@ export const unplugin = createUnplugin((options?: MangleUserConfig) => {
9689
const [file, cssSource] = groupedEntries.css[i]
9790

9891
const { css } = await cssHandler(cssSource.source().toString(), {
99-
replaceMap,
10092
file,
10193
ctx,
10294
})
@@ -113,7 +105,6 @@ export const unplugin = createUnplugin((options?: MangleUserConfig) => {
113105

114106
const html = htmlHandler(asset.source().toString(), {
115107
ctx,
116-
replaceMap,
117108
})
118109
const source = new ConcatSource(html)
119110
compilation.updateAsset(file, source)

0 commit comments

Comments
 (0)