@tailwindcss-mangle/config 2.1.0 → 2.2.1

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/dist/index.cjs CHANGED
@@ -33,7 +33,8 @@ function getDefaultMangleUserConfig() {
33
33
  enable: false,
34
34
  filename: ".tw-patch/tw-map-list.json",
35
35
  loose: true
36
- }
36
+ },
37
+ preserveFunction: []
37
38
  };
38
39
  }
39
40
  function getDefaultUserConfig() {
@@ -0,0 +1,48 @@
1
+ import * as c12 from 'c12';
2
+ import { IClassGeneratorOptions } from '@tailwindcss-mangle/shared';
3
+
4
+ interface ClassMapOutputOptions {
5
+ enable?: boolean;
6
+ filename?: string;
7
+ loose?: boolean;
8
+ }
9
+ interface MangleUserConfig {
10
+ mangleClassFilter?: (className: string) => boolean;
11
+ classGenerator?: IClassGeneratorOptions;
12
+ exclude?: string[];
13
+ include?: string[];
14
+ classListPath?: string;
15
+ classMapOutput?: ClassMapOutputOptions;
16
+ disabled?: boolean;
17
+ preserveFunction?: string[];
18
+ }
19
+ interface PatchUserConfig {
20
+ output?: {
21
+ filename?: string;
22
+ loose?: boolean;
23
+ /**
24
+ * @description remove * in output json
25
+ */
26
+ removeUniversalSelector?: boolean;
27
+ };
28
+ tailwindcss?: {
29
+ cwd?: string;
30
+ config?: string;
31
+ };
32
+ }
33
+ interface UserConfig {
34
+ patch?: PatchUserConfig;
35
+ mangle?: MangleUserConfig;
36
+ }
37
+
38
+ declare function getConfig(cwd?: string): Promise<c12.ResolvedConfig<UserConfig, c12.ConfigLayerMeta>>;
39
+ declare const defineConfig: c12.DefineConfig<UserConfig, c12.ConfigLayerMeta>;
40
+ declare function initConfig(cwd: string): Promise<void>;
41
+
42
+ declare function getDefaultPatchConfig(): PatchUserConfig;
43
+ declare function getDefaultMangleUserConfig(): MangleUserConfig;
44
+ declare function getDefaultUserConfig(): UserConfig;
45
+
46
+ declare const configName = "tailwindcss-mangle";
47
+
48
+ export { type ClassMapOutputOptions, type MangleUserConfig, type PatchUserConfig, type UserConfig, configName, defineConfig, getConfig, getDefaultMangleUserConfig, getDefaultPatchConfig, getDefaultUserConfig, initConfig };
@@ -0,0 +1,48 @@
1
+ import * as c12 from 'c12';
2
+ import { IClassGeneratorOptions } from '@tailwindcss-mangle/shared';
3
+
4
+ interface ClassMapOutputOptions {
5
+ enable?: boolean;
6
+ filename?: string;
7
+ loose?: boolean;
8
+ }
9
+ interface MangleUserConfig {
10
+ mangleClassFilter?: (className: string) => boolean;
11
+ classGenerator?: IClassGeneratorOptions;
12
+ exclude?: string[];
13
+ include?: string[];
14
+ classListPath?: string;
15
+ classMapOutput?: ClassMapOutputOptions;
16
+ disabled?: boolean;
17
+ preserveFunction?: string[];
18
+ }
19
+ interface PatchUserConfig {
20
+ output?: {
21
+ filename?: string;
22
+ loose?: boolean;
23
+ /**
24
+ * @description remove * in output json
25
+ */
26
+ removeUniversalSelector?: boolean;
27
+ };
28
+ tailwindcss?: {
29
+ cwd?: string;
30
+ config?: string;
31
+ };
32
+ }
33
+ interface UserConfig {
34
+ patch?: PatchUserConfig;
35
+ mangle?: MangleUserConfig;
36
+ }
37
+
38
+ declare function getConfig(cwd?: string): Promise<c12.ResolvedConfig<UserConfig, c12.ConfigLayerMeta>>;
39
+ declare const defineConfig: c12.DefineConfig<UserConfig, c12.ConfigLayerMeta>;
40
+ declare function initConfig(cwd: string): Promise<void>;
41
+
42
+ declare function getDefaultPatchConfig(): PatchUserConfig;
43
+ declare function getDefaultMangleUserConfig(): MangleUserConfig;
44
+ declare function getDefaultUserConfig(): UserConfig;
45
+
46
+ declare const configName = "tailwindcss-mangle";
47
+
48
+ export { type ClassMapOutputOptions, type MangleUserConfig, type PatchUserConfig, type UserConfig, configName, defineConfig, getConfig, getDefaultMangleUserConfig, getDefaultPatchConfig, getDefaultUserConfig, initConfig };
package/dist/index.d.ts CHANGED
@@ -14,6 +14,7 @@ interface MangleUserConfig {
14
14
  classListPath?: string;
15
15
  classMapOutput?: ClassMapOutputOptions;
16
16
  disabled?: boolean;
17
+ preserveFunction?: string[];
17
18
  }
18
19
  interface PatchUserConfig {
19
20
  output?: {
@@ -44,4 +45,4 @@ declare function getDefaultUserConfig(): UserConfig;
44
45
 
45
46
  declare const configName = "tailwindcss-mangle";
46
47
 
47
- export { ClassMapOutputOptions, MangleUserConfig, PatchUserConfig, UserConfig, configName, defineConfig, getConfig, getDefaultMangleUserConfig, getDefaultPatchConfig, getDefaultUserConfig, initConfig };
48
+ export { type ClassMapOutputOptions, type MangleUserConfig, type PatchUserConfig, type UserConfig, configName, defineConfig, getConfig, getDefaultMangleUserConfig, getDefaultPatchConfig, getDefaultUserConfig, initConfig };
package/dist/index.mjs CHANGED
@@ -25,7 +25,8 @@ function getDefaultMangleUserConfig() {
25
25
  enable: false,
26
26
  filename: ".tw-patch/tw-map-list.json",
27
27
  loose: true
28
- }
28
+ },
29
+ preserveFunction: []
29
30
  };
30
31
  }
31
32
  function getDefaultUserConfig() {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tailwindcss-mangle/config",
3
- "version": "2.1.0",
3
+ "version": "2.2.1",
4
4
  "description": "The config and load function of tailwindcss-mangle",
5
5
  "exports": {
6
6
  ".": {
@@ -41,7 +41,7 @@
41
41
  "dependencies": {
42
42
  "c12": "^1.4.2",
43
43
  "dedent": "^1.5.1",
44
- "@tailwindcss-mangle/shared": "^2.1.0"
44
+ "@tailwindcss-mangle/shared": "^2.2.1"
45
45
  },
46
46
  "homepage": "https://github.com/sonofmagic/tailwindcss-mangle",
47
47
  "repository": {
@@ -49,6 +49,7 @@
49
49
  "url": "git+https://github.com/sonofmagic/tailwindcss-mangle.git"
50
50
  },
51
51
  "scripts": {
52
+ "dev": "unbuild --sourcemap",
52
53
  "build": "unbuild",
53
54
  "test": "vitest run --coverage.enabled",
54
55
  "test:dev": "vitest"