unplugin-tailwindcss-mangle 1.2.6 → 2.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/README.md +18 -5
- package/dist/esbuild.cjs +15 -0
- package/dist/esbuild.d.ts +7 -2
- package/dist/esbuild.mjs +8 -7
- package/dist/index.cjs +343 -0
- package/dist/index.d.ts +7 -5
- package/dist/index.mjs +301 -330
- package/dist/nuxt.cjs +24 -0
- package/dist/nuxt.d.ts +6 -2
- package/dist/nuxt.mjs +16 -15
- package/dist/rollup.cjs +15 -0
- package/dist/rollup.d.ts +7 -2
- package/dist/rollup.mjs +8 -7
- package/dist/types-3f814672.d.ts +17 -0
- package/dist/vite.cjs +15 -0
- package/dist/vite.d.ts +7 -2
- package/dist/vite.mjs +8 -7
- package/dist/webpack.cjs +15 -0
- package/dist/webpack.d.ts +7 -2
- package/dist/webpack.mjs +8 -7
- package/package.json +24 -28
- package/dist/constants.d.ts +0 -2
- package/dist/esbuild.js +0 -14
- package/dist/index.js +0 -379
- package/dist/loader/twm-css.d.ts +0 -6
- package/dist/nuxt.js +0 -23
- package/dist/options.d.ts +0 -17
- package/dist/rollup.js +0 -14
- package/dist/twm-css.js +0 -19
- package/dist/twm-css.mjs +0 -17
- package/dist/types.d.ts +0 -31
- package/dist/utils.d.ts +0 -10
- package/dist/vite.js +0 -14
- package/dist/webpack.js +0 -14
package/dist/nuxt.cjs
ADDED
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
const index = require('./index.cjs');
|
|
4
|
+
require('node:fs');
|
|
5
|
+
require('node:path');
|
|
6
|
+
require('@tailwindcss-mangle/shared');
|
|
7
|
+
require('@tailwindcss-mangle/config');
|
|
8
|
+
require('fast-sort');
|
|
9
|
+
require('@tailwindcss-mangle/core');
|
|
10
|
+
require('micromatch');
|
|
11
|
+
require('unplugin');
|
|
12
|
+
|
|
13
|
+
function nuxt(options = {}, nuxt) {
|
|
14
|
+
nuxt.hook("webpack:config", async (config) => {
|
|
15
|
+
config.plugins = config.plugins || [];
|
|
16
|
+
config.plugins.unshift(index.webpack(options));
|
|
17
|
+
});
|
|
18
|
+
nuxt.hook("vite:extendConfig", async (config) => {
|
|
19
|
+
config.plugins = config.plugins || [];
|
|
20
|
+
config.plugins.push(index.vite(options));
|
|
21
|
+
});
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
module.exports = nuxt;
|
package/dist/nuxt.d.ts
CHANGED
|
@@ -1,2 +1,6 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
1
|
+
import { O as Options } from './types-3f814672.js';
|
|
2
|
+
import '@tailwindcss-mangle/shared';
|
|
3
|
+
|
|
4
|
+
declare function export_default(options: Options | undefined, nuxt: any): void;
|
|
5
|
+
|
|
6
|
+
export { export_default as default };
|
package/dist/nuxt.mjs
CHANGED
|
@@ -1,21 +1,22 @@
|
|
|
1
|
-
import
|
|
2
|
-
import 'unplugin';
|
|
3
|
-
import 'micromatch';
|
|
1
|
+
import unplugin from './index.mjs';
|
|
4
2
|
import 'node:fs';
|
|
5
3
|
import 'node:path';
|
|
6
|
-
import 'tailwindcss-mangle
|
|
7
|
-
import 'tailwindcss-mangle
|
|
8
|
-
import '
|
|
4
|
+
import '@tailwindcss-mangle/shared';
|
|
5
|
+
import '@tailwindcss-mangle/config';
|
|
6
|
+
import 'fast-sort';
|
|
7
|
+
import '@tailwindcss-mangle/core';
|
|
8
|
+
import 'micromatch';
|
|
9
|
+
import 'unplugin';
|
|
9
10
|
|
|
10
|
-
function nuxt
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
11
|
+
function nuxt(options = {}, nuxt) {
|
|
12
|
+
nuxt.hook("webpack:config", async (config) => {
|
|
13
|
+
config.plugins = config.plugins || [];
|
|
14
|
+
config.plugins.unshift(unplugin.webpack(options));
|
|
15
|
+
});
|
|
16
|
+
nuxt.hook("vite:extendConfig", async (config) => {
|
|
17
|
+
config.plugins = config.plugins || [];
|
|
18
|
+
config.plugins.push(unplugin.vite(options));
|
|
19
|
+
});
|
|
19
20
|
}
|
|
20
21
|
|
|
21
22
|
export { nuxt as default };
|
package/dist/rollup.cjs
ADDED
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
const index = require('./index.cjs');
|
|
4
|
+
require('node:fs');
|
|
5
|
+
require('node:path');
|
|
6
|
+
require('@tailwindcss-mangle/shared');
|
|
7
|
+
require('@tailwindcss-mangle/config');
|
|
8
|
+
require('fast-sort');
|
|
9
|
+
require('@tailwindcss-mangle/core');
|
|
10
|
+
require('micromatch');
|
|
11
|
+
require('unplugin');
|
|
12
|
+
|
|
13
|
+
const rollup = index.rollup;
|
|
14
|
+
|
|
15
|
+
module.exports = rollup;
|
package/dist/rollup.d.ts
CHANGED
|
@@ -1,2 +1,7 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
import * as rollup from 'rollup';
|
|
2
|
+
import { O as Options } from './types-3f814672.js';
|
|
3
|
+
import '@tailwindcss-mangle/shared';
|
|
4
|
+
|
|
5
|
+
declare const _default: (options?: Options | undefined) => rollup.Plugin | rollup.Plugin[];
|
|
6
|
+
|
|
7
|
+
export { _default as default };
|
package/dist/rollup.mjs
CHANGED
|
@@ -1,12 +1,13 @@
|
|
|
1
|
-
import
|
|
2
|
-
import 'unplugin';
|
|
3
|
-
import 'micromatch';
|
|
1
|
+
import unplugin from './index.mjs';
|
|
4
2
|
import 'node:fs';
|
|
5
3
|
import 'node:path';
|
|
6
|
-
import 'tailwindcss-mangle
|
|
7
|
-
import 'tailwindcss-mangle
|
|
8
|
-
import '
|
|
4
|
+
import '@tailwindcss-mangle/shared';
|
|
5
|
+
import '@tailwindcss-mangle/config';
|
|
6
|
+
import 'fast-sort';
|
|
7
|
+
import '@tailwindcss-mangle/core';
|
|
8
|
+
import 'micromatch';
|
|
9
|
+
import 'unplugin';
|
|
9
10
|
|
|
10
|
-
|
|
11
|
+
const rollup = unplugin.rollup;
|
|
11
12
|
|
|
12
13
|
export { rollup as default };
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { IClassGeneratorOptions } from '@tailwindcss-mangle/shared';
|
|
2
|
+
|
|
3
|
+
interface ClassMapOutputOptions {
|
|
4
|
+
filename: string;
|
|
5
|
+
dir?: string;
|
|
6
|
+
}
|
|
7
|
+
interface Options {
|
|
8
|
+
mangleClassFilter?: (className: string) => boolean;
|
|
9
|
+
classGenerator?: IClassGeneratorOptions;
|
|
10
|
+
exclude?: string[];
|
|
11
|
+
include?: string[];
|
|
12
|
+
classListPath?: string;
|
|
13
|
+
classMapOutput?: boolean | ClassMapOutputOptions;
|
|
14
|
+
disabled?: boolean;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
export { Options as O };
|
package/dist/vite.cjs
ADDED
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
const index = require('./index.cjs');
|
|
4
|
+
require('node:fs');
|
|
5
|
+
require('node:path');
|
|
6
|
+
require('@tailwindcss-mangle/shared');
|
|
7
|
+
require('@tailwindcss-mangle/config');
|
|
8
|
+
require('fast-sort');
|
|
9
|
+
require('@tailwindcss-mangle/core');
|
|
10
|
+
require('micromatch');
|
|
11
|
+
require('unplugin');
|
|
12
|
+
|
|
13
|
+
const vite = index.vite;
|
|
14
|
+
|
|
15
|
+
module.exports = vite;
|
package/dist/vite.d.ts
CHANGED
|
@@ -1,2 +1,7 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
import * as vite from 'vite';
|
|
2
|
+
import { O as Options } from './types-3f814672.js';
|
|
3
|
+
import '@tailwindcss-mangle/shared';
|
|
4
|
+
|
|
5
|
+
declare const _default: (options?: Options | undefined) => vite.Plugin | vite.Plugin[];
|
|
6
|
+
|
|
7
|
+
export { _default as default };
|
package/dist/vite.mjs
CHANGED
|
@@ -1,12 +1,13 @@
|
|
|
1
|
-
import
|
|
2
|
-
import 'unplugin';
|
|
3
|
-
import 'micromatch';
|
|
1
|
+
import unplugin from './index.mjs';
|
|
4
2
|
import 'node:fs';
|
|
5
3
|
import 'node:path';
|
|
6
|
-
import 'tailwindcss-mangle
|
|
7
|
-
import 'tailwindcss-mangle
|
|
8
|
-
import '
|
|
4
|
+
import '@tailwindcss-mangle/shared';
|
|
5
|
+
import '@tailwindcss-mangle/config';
|
|
6
|
+
import 'fast-sort';
|
|
7
|
+
import '@tailwindcss-mangle/core';
|
|
8
|
+
import 'micromatch';
|
|
9
|
+
import 'unplugin';
|
|
9
10
|
|
|
10
|
-
|
|
11
|
+
const vite = unplugin.vite;
|
|
11
12
|
|
|
12
13
|
export { vite as default };
|
package/dist/webpack.cjs
ADDED
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
const index = require('./index.cjs');
|
|
4
|
+
require('node:fs');
|
|
5
|
+
require('node:path');
|
|
6
|
+
require('@tailwindcss-mangle/shared');
|
|
7
|
+
require('@tailwindcss-mangle/config');
|
|
8
|
+
require('fast-sort');
|
|
9
|
+
require('@tailwindcss-mangle/core');
|
|
10
|
+
require('micromatch');
|
|
11
|
+
require('unplugin');
|
|
12
|
+
|
|
13
|
+
const webpack = index.webpack;
|
|
14
|
+
|
|
15
|
+
module.exports = webpack;
|
package/dist/webpack.d.ts
CHANGED
|
@@ -1,2 +1,7 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
import * as webpack from 'webpack';
|
|
2
|
+
import { O as Options } from './types-3f814672.js';
|
|
3
|
+
import '@tailwindcss-mangle/shared';
|
|
4
|
+
|
|
5
|
+
declare const _default: (options?: Options | undefined) => webpack.WebpackPluginInstance;
|
|
6
|
+
|
|
7
|
+
export { _default as default };
|
package/dist/webpack.mjs
CHANGED
|
@@ -1,12 +1,13 @@
|
|
|
1
|
-
import
|
|
2
|
-
import 'unplugin';
|
|
3
|
-
import 'micromatch';
|
|
1
|
+
import unplugin from './index.mjs';
|
|
4
2
|
import 'node:fs';
|
|
5
3
|
import 'node:path';
|
|
6
|
-
import 'tailwindcss-mangle
|
|
7
|
-
import 'tailwindcss-mangle
|
|
8
|
-
import '
|
|
4
|
+
import '@tailwindcss-mangle/shared';
|
|
5
|
+
import '@tailwindcss-mangle/config';
|
|
6
|
+
import 'fast-sort';
|
|
7
|
+
import '@tailwindcss-mangle/core';
|
|
8
|
+
import 'micromatch';
|
|
9
|
+
import 'unplugin';
|
|
9
10
|
|
|
10
|
-
|
|
11
|
+
const webpack = unplugin.webpack;
|
|
11
12
|
|
|
12
13
|
export { webpack as default };
|
package/package.json
CHANGED
|
@@ -1,48 +1,48 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "unplugin-tailwindcss-mangle",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "2.0.0",
|
|
4
4
|
"description": "mangle tailwindcss utilities class plugin. support vite and webpack!",
|
|
5
|
-
"main": "./dist/index.
|
|
5
|
+
"main": "./dist/index.cjs",
|
|
6
6
|
"module": "./dist/index.mjs",
|
|
7
7
|
"types": "./dist/index.d.ts",
|
|
8
8
|
"exports": {
|
|
9
9
|
".": {
|
|
10
10
|
"types": "./dist/index.d.ts",
|
|
11
|
-
"require": "./dist/index.
|
|
11
|
+
"require": "./dist/index.cjs",
|
|
12
12
|
"import": "./dist/index.mjs"
|
|
13
13
|
},
|
|
14
14
|
"./vite": {
|
|
15
15
|
"types": "./dist/vite.d.ts",
|
|
16
|
-
"require": "./dist/vite.
|
|
16
|
+
"require": "./dist/vite.cjs",
|
|
17
17
|
"import": "./dist/vite.mjs"
|
|
18
18
|
},
|
|
19
19
|
"./webpack": {
|
|
20
20
|
"types": "./dist/webpack.d.ts",
|
|
21
|
-
"require": "./dist/webpack.
|
|
21
|
+
"require": "./dist/webpack.cjs",
|
|
22
22
|
"import": "./dist/webpack.mjs"
|
|
23
23
|
},
|
|
24
24
|
"./rollup": {
|
|
25
25
|
"types": "./dist/rollup.d.ts",
|
|
26
|
-
"require": "./dist/rollup.
|
|
26
|
+
"require": "./dist/rollup.cjs",
|
|
27
27
|
"import": "./dist/rollup.mjs"
|
|
28
28
|
},
|
|
29
29
|
"./esbuild": {
|
|
30
30
|
"types": "./dist/esbuild.d.ts",
|
|
31
|
-
"require": "./dist/esbuild.
|
|
31
|
+
"require": "./dist/esbuild.cjs",
|
|
32
32
|
"import": "./dist/esbuild.mjs"
|
|
33
33
|
},
|
|
34
34
|
"./nuxt": {
|
|
35
35
|
"types": "./dist/nuxt.d.ts",
|
|
36
|
-
"require": "./dist/nuxt.
|
|
36
|
+
"require": "./dist/nuxt.cjs",
|
|
37
37
|
"import": "./dist/nuxt.mjs"
|
|
38
38
|
},
|
|
39
39
|
"./*": "./*"
|
|
40
40
|
},
|
|
41
41
|
"typesVersions": {
|
|
42
|
-
"
|
|
42
|
+
"*": {
|
|
43
43
|
"*": [
|
|
44
44
|
"./dist/*",
|
|
45
|
-
"
|
|
45
|
+
"./dist/index.d.ts"
|
|
46
46
|
]
|
|
47
47
|
}
|
|
48
48
|
},
|
|
@@ -60,29 +60,30 @@
|
|
|
60
60
|
"author": "SonOfMagic <qq1324318532@gmail.com>",
|
|
61
61
|
"license": "MIT",
|
|
62
62
|
"dependencies": {
|
|
63
|
+
"fast-sort": "^3.4.0",
|
|
63
64
|
"micromatch": "^4.0.5",
|
|
64
|
-
"unplugin": "^1.
|
|
65
|
-
"tailwindcss-mangle
|
|
66
|
-
"tailwindcss-mangle
|
|
67
|
-
"tailwindcss-
|
|
65
|
+
"unplugin": "^1.4.0",
|
|
66
|
+
"@tailwindcss-mangle/config": "^1.0.1",
|
|
67
|
+
"@tailwindcss-mangle/core": "^2.0.0",
|
|
68
|
+
"@tailwindcss-mangle/shared": "^2.0.0"
|
|
68
69
|
},
|
|
69
70
|
"publishConfig": {
|
|
70
71
|
"access": "public",
|
|
71
72
|
"registry": "https://registry.npmjs.org/"
|
|
72
73
|
},
|
|
73
74
|
"devDependencies": {
|
|
75
|
+
"@types/babel__helper-plugin-utils": "^7.10.0",
|
|
74
76
|
"@types/micromatch": "^4.0.2",
|
|
75
77
|
"css-loader": "^6.8.1",
|
|
76
78
|
"html-webpack-plugin": "^5.5.3",
|
|
77
79
|
"mini-css-extract-plugin": "^2.7.6",
|
|
78
|
-
"postcss": "^8.4.
|
|
80
|
+
"postcss": "^8.4.27",
|
|
79
81
|
"postcss-loader": "^7.3.3",
|
|
80
|
-
"
|
|
81
|
-
"
|
|
82
|
-
"
|
|
83
|
-
"
|
|
84
|
-
"
|
|
85
|
-
"webpack-build-utils": "^0.0.4"
|
|
82
|
+
"tailwindcss": "^3.3.3",
|
|
83
|
+
"vite": "^4.4.9",
|
|
84
|
+
"webpack": "^5.88.2",
|
|
85
|
+
"webpack-build-utils": "^0.0.4",
|
|
86
|
+
"tailwindcss-patch": "^2.0.3"
|
|
86
87
|
},
|
|
87
88
|
"homepage": "https://github.com/sonofmagic/tailwindcss-mangle",
|
|
88
89
|
"repository": {
|
|
@@ -90,13 +91,8 @@
|
|
|
90
91
|
"url": "git+https://github.com/sonofmagic/tailwindcss-mangle.git"
|
|
91
92
|
},
|
|
92
93
|
"scripts": {
|
|
93
|
-
"
|
|
94
|
-
"build": "cross-env NODE_ENV=production rollup -c",
|
|
95
|
-
"dev:tsc": "tsc -p tsconfig.json --sourceMap",
|
|
96
|
-
"build:tsc": "tsc -p tsconfig.json",
|
|
97
|
-
"_test": "jest",
|
|
94
|
+
"build": "unbuild",
|
|
98
95
|
"test": "vitest run",
|
|
99
|
-
"test:dev": "vitest"
|
|
100
|
-
"_prepare": "tw-patch"
|
|
96
|
+
"test:dev": "vitest"
|
|
101
97
|
}
|
|
102
98
|
}
|
package/dist/constants.d.ts
DELETED
package/dist/esbuild.js
DELETED
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
var index = require('./index.js');
|
|
4
|
-
require('unplugin');
|
|
5
|
-
require('micromatch');
|
|
6
|
-
require('node:fs');
|
|
7
|
-
require('node:path');
|
|
8
|
-
require('tailwindcss-mangle-shared');
|
|
9
|
-
require('tailwindcss-mangle-core');
|
|
10
|
-
require('tailwindcss-patch');
|
|
11
|
-
|
|
12
|
-
var esbuild = index.unplugin.esbuild;
|
|
13
|
-
|
|
14
|
-
module.exports = esbuild;
|