@tailwindcss-mangle/core 2.3.0 → 4.0.0-alpha.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/LICENSE +21 -0
- package/package.json +17 -25
- package/dist/index.cjs +0 -589
- package/dist/index.d.cts +0 -88
- package/dist/index.d.mts +0 -88
- package/dist/index.d.ts +0 -88
- package/dist/index.mjs +0 -570
package/dist/index.d.cts
DELETED
|
@@ -1,88 +0,0 @@
|
|
|
1
|
-
import * as _tailwindcss_mangle_config from '@tailwindcss-mangle/config';
|
|
2
|
-
import { MangleUserConfig } from '@tailwindcss-mangle/config';
|
|
3
|
-
import { ClassGenerator } from '@tailwindcss-mangle/shared';
|
|
4
|
-
export { ClassGenerator } from '@tailwindcss-mangle/shared';
|
|
5
|
-
import postcss from 'postcss';
|
|
6
|
-
import * as MagicString from 'magic-string';
|
|
7
|
-
import MagicString__default from 'magic-string';
|
|
8
|
-
import { StringLiteral, TemplateElement } from '@babel/types';
|
|
9
|
-
|
|
10
|
-
interface InitConfigOptions {
|
|
11
|
-
cwd?: string;
|
|
12
|
-
classList?: string[];
|
|
13
|
-
mangleOptions?: MangleUserConfig;
|
|
14
|
-
}
|
|
15
|
-
declare class Context {
|
|
16
|
-
options: MangleUserConfig;
|
|
17
|
-
private includeMatcher;
|
|
18
|
-
private excludeMatcher;
|
|
19
|
-
replaceMap: Map<string, string>;
|
|
20
|
-
classSet: Set<string>;
|
|
21
|
-
classGenerator: ClassGenerator;
|
|
22
|
-
preserveFunctionSet: Set<string>;
|
|
23
|
-
preserveClassNamesSet: Set<string>;
|
|
24
|
-
preserveFunctionRegexs: RegExp[];
|
|
25
|
-
constructor();
|
|
26
|
-
isPreserveClass(className: string): boolean;
|
|
27
|
-
addPreserveClass(className: string): Set<string>;
|
|
28
|
-
isPreserveFunction(calleeName: string): boolean;
|
|
29
|
-
private mergeOptions;
|
|
30
|
-
isInclude(file: string): boolean;
|
|
31
|
-
currentMangleClassFilter(className: string): boolean;
|
|
32
|
-
getClassSet(): Set<string>;
|
|
33
|
-
getReplaceMap(): Map<string, string>;
|
|
34
|
-
addToUsedBy(key: string, file: string): void;
|
|
35
|
-
loadClassSet(classList: string[]): void;
|
|
36
|
-
initConfig(opts?: InitConfigOptions): Promise<_tailwindcss_mangle_config.UserConfig>;
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
interface IClassGeneratorContextItem {
|
|
40
|
-
name: string;
|
|
41
|
-
usedBy: string[];
|
|
42
|
-
}
|
|
43
|
-
interface IClassGeneratorOptions {
|
|
44
|
-
reserveClassName?: (string | RegExp)[];
|
|
45
|
-
customGenerate?: (original: string, opts: IClassGeneratorOptions, context: Record<string, any>) => string | undefined;
|
|
46
|
-
log?: boolean;
|
|
47
|
-
exclude?: (string | RegExp)[];
|
|
48
|
-
include?: (string | RegExp)[];
|
|
49
|
-
ignoreClass?: (string | RegExp)[];
|
|
50
|
-
classPrefix?: string;
|
|
51
|
-
}
|
|
52
|
-
interface IHandlerOptions {
|
|
53
|
-
ctx: Context;
|
|
54
|
-
}
|
|
55
|
-
interface IHtmlHandlerOptions extends IHandlerOptions {
|
|
56
|
-
isVue?: boolean;
|
|
57
|
-
}
|
|
58
|
-
interface IJsHandlerOptions extends IHandlerOptions {
|
|
59
|
-
splitQuote?: boolean;
|
|
60
|
-
minified?: boolean;
|
|
61
|
-
}
|
|
62
|
-
interface IVueHandlerOptions extends IHandlerOptions {
|
|
63
|
-
}
|
|
64
|
-
interface ICssHandlerOptions extends IHandlerOptions {
|
|
65
|
-
ignoreVueScoped?: boolean;
|
|
66
|
-
file?: string;
|
|
67
|
-
}
|
|
68
|
-
interface IPreProcessJsOptions extends IHandlerOptions {
|
|
69
|
-
code: string | MagicString__default;
|
|
70
|
-
id: string;
|
|
71
|
-
}
|
|
72
|
-
|
|
73
|
-
declare function cssHandler(rawSource: string, options: ICssHandlerOptions): postcss.LazyResult<postcss.Root>;
|
|
74
|
-
|
|
75
|
-
declare function htmlHandler(raw: string | MagicString__default, options: IHtmlHandlerOptions): string;
|
|
76
|
-
|
|
77
|
-
declare function preProcessJs(options: IPreProcessJsOptions): string;
|
|
78
|
-
declare function preProcessRawCode(options: IPreProcessJsOptions): string;
|
|
79
|
-
|
|
80
|
-
declare function handleValue(raw: string, node: StringLiteral | TemplateElement, options: IJsHandlerOptions, ms: MagicString__default, offset: number, escape: boolean): string;
|
|
81
|
-
declare function jsHandler(rawSource: string | MagicString__default, options: IJsHandlerOptions): {
|
|
82
|
-
code: string;
|
|
83
|
-
readonly map: MagicString.SourceMap;
|
|
84
|
-
};
|
|
85
|
-
|
|
86
|
-
declare function vueHandler(raw: string | MagicString__default, options: IVueHandlerOptions): string;
|
|
87
|
-
|
|
88
|
-
export { Context, type IClassGeneratorContextItem, type IClassGeneratorOptions, type ICssHandlerOptions, type IHandlerOptions, type IHtmlHandlerOptions, type IJsHandlerOptions, type IPreProcessJsOptions, type IVueHandlerOptions, cssHandler, handleValue, htmlHandler, jsHandler, preProcessJs, preProcessRawCode, vueHandler };
|
package/dist/index.d.mts
DELETED
|
@@ -1,88 +0,0 @@
|
|
|
1
|
-
import * as _tailwindcss_mangle_config from '@tailwindcss-mangle/config';
|
|
2
|
-
import { MangleUserConfig } from '@tailwindcss-mangle/config';
|
|
3
|
-
import { ClassGenerator } from '@tailwindcss-mangle/shared';
|
|
4
|
-
export { ClassGenerator } from '@tailwindcss-mangle/shared';
|
|
5
|
-
import postcss from 'postcss';
|
|
6
|
-
import * as MagicString from 'magic-string';
|
|
7
|
-
import MagicString__default from 'magic-string';
|
|
8
|
-
import { StringLiteral, TemplateElement } from '@babel/types';
|
|
9
|
-
|
|
10
|
-
interface InitConfigOptions {
|
|
11
|
-
cwd?: string;
|
|
12
|
-
classList?: string[];
|
|
13
|
-
mangleOptions?: MangleUserConfig;
|
|
14
|
-
}
|
|
15
|
-
declare class Context {
|
|
16
|
-
options: MangleUserConfig;
|
|
17
|
-
private includeMatcher;
|
|
18
|
-
private excludeMatcher;
|
|
19
|
-
replaceMap: Map<string, string>;
|
|
20
|
-
classSet: Set<string>;
|
|
21
|
-
classGenerator: ClassGenerator;
|
|
22
|
-
preserveFunctionSet: Set<string>;
|
|
23
|
-
preserveClassNamesSet: Set<string>;
|
|
24
|
-
preserveFunctionRegexs: RegExp[];
|
|
25
|
-
constructor();
|
|
26
|
-
isPreserveClass(className: string): boolean;
|
|
27
|
-
addPreserveClass(className: string): Set<string>;
|
|
28
|
-
isPreserveFunction(calleeName: string): boolean;
|
|
29
|
-
private mergeOptions;
|
|
30
|
-
isInclude(file: string): boolean;
|
|
31
|
-
currentMangleClassFilter(className: string): boolean;
|
|
32
|
-
getClassSet(): Set<string>;
|
|
33
|
-
getReplaceMap(): Map<string, string>;
|
|
34
|
-
addToUsedBy(key: string, file: string): void;
|
|
35
|
-
loadClassSet(classList: string[]): void;
|
|
36
|
-
initConfig(opts?: InitConfigOptions): Promise<_tailwindcss_mangle_config.UserConfig>;
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
interface IClassGeneratorContextItem {
|
|
40
|
-
name: string;
|
|
41
|
-
usedBy: string[];
|
|
42
|
-
}
|
|
43
|
-
interface IClassGeneratorOptions {
|
|
44
|
-
reserveClassName?: (string | RegExp)[];
|
|
45
|
-
customGenerate?: (original: string, opts: IClassGeneratorOptions, context: Record<string, any>) => string | undefined;
|
|
46
|
-
log?: boolean;
|
|
47
|
-
exclude?: (string | RegExp)[];
|
|
48
|
-
include?: (string | RegExp)[];
|
|
49
|
-
ignoreClass?: (string | RegExp)[];
|
|
50
|
-
classPrefix?: string;
|
|
51
|
-
}
|
|
52
|
-
interface IHandlerOptions {
|
|
53
|
-
ctx: Context;
|
|
54
|
-
}
|
|
55
|
-
interface IHtmlHandlerOptions extends IHandlerOptions {
|
|
56
|
-
isVue?: boolean;
|
|
57
|
-
}
|
|
58
|
-
interface IJsHandlerOptions extends IHandlerOptions {
|
|
59
|
-
splitQuote?: boolean;
|
|
60
|
-
minified?: boolean;
|
|
61
|
-
}
|
|
62
|
-
interface IVueHandlerOptions extends IHandlerOptions {
|
|
63
|
-
}
|
|
64
|
-
interface ICssHandlerOptions extends IHandlerOptions {
|
|
65
|
-
ignoreVueScoped?: boolean;
|
|
66
|
-
file?: string;
|
|
67
|
-
}
|
|
68
|
-
interface IPreProcessJsOptions extends IHandlerOptions {
|
|
69
|
-
code: string | MagicString__default;
|
|
70
|
-
id: string;
|
|
71
|
-
}
|
|
72
|
-
|
|
73
|
-
declare function cssHandler(rawSource: string, options: ICssHandlerOptions): postcss.LazyResult<postcss.Root>;
|
|
74
|
-
|
|
75
|
-
declare function htmlHandler(raw: string | MagicString__default, options: IHtmlHandlerOptions): string;
|
|
76
|
-
|
|
77
|
-
declare function preProcessJs(options: IPreProcessJsOptions): string;
|
|
78
|
-
declare function preProcessRawCode(options: IPreProcessJsOptions): string;
|
|
79
|
-
|
|
80
|
-
declare function handleValue(raw: string, node: StringLiteral | TemplateElement, options: IJsHandlerOptions, ms: MagicString__default, offset: number, escape: boolean): string;
|
|
81
|
-
declare function jsHandler(rawSource: string | MagicString__default, options: IJsHandlerOptions): {
|
|
82
|
-
code: string;
|
|
83
|
-
readonly map: MagicString.SourceMap;
|
|
84
|
-
};
|
|
85
|
-
|
|
86
|
-
declare function vueHandler(raw: string | MagicString__default, options: IVueHandlerOptions): string;
|
|
87
|
-
|
|
88
|
-
export { Context, type IClassGeneratorContextItem, type IClassGeneratorOptions, type ICssHandlerOptions, type IHandlerOptions, type IHtmlHandlerOptions, type IJsHandlerOptions, type IPreProcessJsOptions, type IVueHandlerOptions, cssHandler, handleValue, htmlHandler, jsHandler, preProcessJs, preProcessRawCode, vueHandler };
|
package/dist/index.d.ts
DELETED
|
@@ -1,88 +0,0 @@
|
|
|
1
|
-
import * as _tailwindcss_mangle_config from '@tailwindcss-mangle/config';
|
|
2
|
-
import { MangleUserConfig } from '@tailwindcss-mangle/config';
|
|
3
|
-
import { ClassGenerator } from '@tailwindcss-mangle/shared';
|
|
4
|
-
export { ClassGenerator } from '@tailwindcss-mangle/shared';
|
|
5
|
-
import postcss from 'postcss';
|
|
6
|
-
import * as MagicString from 'magic-string';
|
|
7
|
-
import MagicString__default from 'magic-string';
|
|
8
|
-
import { StringLiteral, TemplateElement } from '@babel/types';
|
|
9
|
-
|
|
10
|
-
interface InitConfigOptions {
|
|
11
|
-
cwd?: string;
|
|
12
|
-
classList?: string[];
|
|
13
|
-
mangleOptions?: MangleUserConfig;
|
|
14
|
-
}
|
|
15
|
-
declare class Context {
|
|
16
|
-
options: MangleUserConfig;
|
|
17
|
-
private includeMatcher;
|
|
18
|
-
private excludeMatcher;
|
|
19
|
-
replaceMap: Map<string, string>;
|
|
20
|
-
classSet: Set<string>;
|
|
21
|
-
classGenerator: ClassGenerator;
|
|
22
|
-
preserveFunctionSet: Set<string>;
|
|
23
|
-
preserveClassNamesSet: Set<string>;
|
|
24
|
-
preserveFunctionRegexs: RegExp[];
|
|
25
|
-
constructor();
|
|
26
|
-
isPreserveClass(className: string): boolean;
|
|
27
|
-
addPreserveClass(className: string): Set<string>;
|
|
28
|
-
isPreserveFunction(calleeName: string): boolean;
|
|
29
|
-
private mergeOptions;
|
|
30
|
-
isInclude(file: string): boolean;
|
|
31
|
-
currentMangleClassFilter(className: string): boolean;
|
|
32
|
-
getClassSet(): Set<string>;
|
|
33
|
-
getReplaceMap(): Map<string, string>;
|
|
34
|
-
addToUsedBy(key: string, file: string): void;
|
|
35
|
-
loadClassSet(classList: string[]): void;
|
|
36
|
-
initConfig(opts?: InitConfigOptions): Promise<_tailwindcss_mangle_config.UserConfig>;
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
interface IClassGeneratorContextItem {
|
|
40
|
-
name: string;
|
|
41
|
-
usedBy: string[];
|
|
42
|
-
}
|
|
43
|
-
interface IClassGeneratorOptions {
|
|
44
|
-
reserveClassName?: (string | RegExp)[];
|
|
45
|
-
customGenerate?: (original: string, opts: IClassGeneratorOptions, context: Record<string, any>) => string | undefined;
|
|
46
|
-
log?: boolean;
|
|
47
|
-
exclude?: (string | RegExp)[];
|
|
48
|
-
include?: (string | RegExp)[];
|
|
49
|
-
ignoreClass?: (string | RegExp)[];
|
|
50
|
-
classPrefix?: string;
|
|
51
|
-
}
|
|
52
|
-
interface IHandlerOptions {
|
|
53
|
-
ctx: Context;
|
|
54
|
-
}
|
|
55
|
-
interface IHtmlHandlerOptions extends IHandlerOptions {
|
|
56
|
-
isVue?: boolean;
|
|
57
|
-
}
|
|
58
|
-
interface IJsHandlerOptions extends IHandlerOptions {
|
|
59
|
-
splitQuote?: boolean;
|
|
60
|
-
minified?: boolean;
|
|
61
|
-
}
|
|
62
|
-
interface IVueHandlerOptions extends IHandlerOptions {
|
|
63
|
-
}
|
|
64
|
-
interface ICssHandlerOptions extends IHandlerOptions {
|
|
65
|
-
ignoreVueScoped?: boolean;
|
|
66
|
-
file?: string;
|
|
67
|
-
}
|
|
68
|
-
interface IPreProcessJsOptions extends IHandlerOptions {
|
|
69
|
-
code: string | MagicString__default;
|
|
70
|
-
id: string;
|
|
71
|
-
}
|
|
72
|
-
|
|
73
|
-
declare function cssHandler(rawSource: string, options: ICssHandlerOptions): postcss.LazyResult<postcss.Root>;
|
|
74
|
-
|
|
75
|
-
declare function htmlHandler(raw: string | MagicString__default, options: IHtmlHandlerOptions): string;
|
|
76
|
-
|
|
77
|
-
declare function preProcessJs(options: IPreProcessJsOptions): string;
|
|
78
|
-
declare function preProcessRawCode(options: IPreProcessJsOptions): string;
|
|
79
|
-
|
|
80
|
-
declare function handleValue(raw: string, node: StringLiteral | TemplateElement, options: IJsHandlerOptions, ms: MagicString__default, offset: number, escape: boolean): string;
|
|
81
|
-
declare function jsHandler(rawSource: string | MagicString__default, options: IJsHandlerOptions): {
|
|
82
|
-
code: string;
|
|
83
|
-
readonly map: MagicString.SourceMap;
|
|
84
|
-
};
|
|
85
|
-
|
|
86
|
-
declare function vueHandler(raw: string | MagicString__default, options: IVueHandlerOptions): string;
|
|
87
|
-
|
|
88
|
-
export { Context, type IClassGeneratorContextItem, type IClassGeneratorOptions, type ICssHandlerOptions, type IHandlerOptions, type IHtmlHandlerOptions, type IJsHandlerOptions, type IPreProcessJsOptions, type IVueHandlerOptions, cssHandler, handleValue, htmlHandler, jsHandler, preProcessJs, preProcessRawCode, vueHandler };
|