@fullhuman/postcss-purgecss 5.0.0 → 6.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/lib/postcss-purgecss.d.ts +53 -53
- package/package.json +2 -2
|
@@ -12,7 +12,7 @@ import * as postcss from 'postcss';
|
|
|
12
12
|
/**
|
|
13
13
|
* @public
|
|
14
14
|
*/
|
|
15
|
-
declare type ComplexSafelist = {
|
|
15
|
+
export declare type ComplexSafelist = {
|
|
16
16
|
standard?: StringRegExpArray;
|
|
17
17
|
/**
|
|
18
18
|
* You can safelist selectors and their children based on a regular
|
|
@@ -43,17 +43,17 @@ declare type ComplexSafelist = {
|
|
|
43
43
|
/**
|
|
44
44
|
* @public
|
|
45
45
|
*/
|
|
46
|
-
declare type ExtractorFunction<T = string> = (content: T) => ExtractorResult;
|
|
46
|
+
export declare type ExtractorFunction<T = string> = (content: T) => ExtractorResult;
|
|
47
47
|
|
|
48
48
|
/**
|
|
49
49
|
* @public
|
|
50
50
|
*/
|
|
51
|
-
declare type ExtractorResult = ExtractorResultDetailed | string[];
|
|
51
|
+
export declare type ExtractorResult = ExtractorResultDetailed | string[];
|
|
52
52
|
|
|
53
53
|
/**
|
|
54
54
|
* @public
|
|
55
55
|
*/
|
|
56
|
-
declare interface ExtractorResultDetailed {
|
|
56
|
+
export declare interface ExtractorResultDetailed {
|
|
57
57
|
attributes: {
|
|
58
58
|
names: string[];
|
|
59
59
|
values: string[];
|
|
@@ -67,7 +67,7 @@ declare interface ExtractorResultDetailed {
|
|
|
67
67
|
/**
|
|
68
68
|
* @public
|
|
69
69
|
*/
|
|
70
|
-
declare interface Extractors {
|
|
70
|
+
export declare interface Extractors {
|
|
71
71
|
extensions: string[];
|
|
72
72
|
extractor: ExtractorFunction;
|
|
73
73
|
}
|
|
@@ -83,10 +83,52 @@ declare interface Extractors {
|
|
|
83
83
|
declare const purgeCSSPlugin: postcss.PluginCreator<UserDefinedOptions>;
|
|
84
84
|
export default purgeCSSPlugin;
|
|
85
85
|
|
|
86
|
+
/**
|
|
87
|
+
* Options used by PurgeCSS to remove unused CSS
|
|
88
|
+
*
|
|
89
|
+
* @public
|
|
90
|
+
*/
|
|
91
|
+
export declare interface PurgeCSSUserDefinedOptions {
|
|
92
|
+
/** {@inheritDoc purgecss#Options.content} */
|
|
93
|
+
content: Array<string | RawContent>;
|
|
94
|
+
/** {@inheritDoc purgecss#Options.css} */
|
|
95
|
+
css: Array<string | RawCSS>;
|
|
96
|
+
/** {@inheritDoc purgecss#Options.defaultExtractor} */
|
|
97
|
+
defaultExtractor?: ExtractorFunction;
|
|
98
|
+
/** {@inheritDoc purgecss#Options.extractors} */
|
|
99
|
+
extractors?: Array<Extractors>;
|
|
100
|
+
/** {@inheritDoc purgecss#Options.fontFace} */
|
|
101
|
+
fontFace?: boolean;
|
|
102
|
+
/** {@inheritDoc purgecss#Options.keyframes} */
|
|
103
|
+
keyframes?: boolean;
|
|
104
|
+
/** {@inheritDoc purgecss#Options.output} */
|
|
105
|
+
output?: string;
|
|
106
|
+
/** {@inheritDoc purgecss#Options.rejected} */
|
|
107
|
+
rejected?: boolean;
|
|
108
|
+
/** {@inheritDoc purgecss#Options.rejectedCss} */
|
|
109
|
+
rejectedCss?: boolean;
|
|
110
|
+
/** {@inheritDoc purgecss#Options.sourceMap } */
|
|
111
|
+
sourceMap?: boolean | (postcss.SourceMapOptions & { to?: string });
|
|
112
|
+
/** {@inheritDoc purgecss#Options.stdin} */
|
|
113
|
+
stdin?: boolean;
|
|
114
|
+
/** {@inheritDoc purgecss#Options.stdout} */
|
|
115
|
+
stdout?: boolean;
|
|
116
|
+
/** {@inheritDoc purgecss#Options.variables} */
|
|
117
|
+
variables?: boolean;
|
|
118
|
+
/** {@inheritDoc purgecss#Options.safelist} */
|
|
119
|
+
safelist?: UserDefinedSafelist;
|
|
120
|
+
/** {@inheritDoc purgecss#Options.blocklist} */
|
|
121
|
+
blocklist?: StringRegExpArray;
|
|
122
|
+
/** {@inheritDoc purgecss#Options.skippedContentGlobs} */
|
|
123
|
+
skippedContentGlobs?: Array<string>;
|
|
124
|
+
/** {@inheritDoc purgecss#Options.dynamicAttributes} */
|
|
125
|
+
dynamicAttributes?: string[];
|
|
126
|
+
}
|
|
127
|
+
|
|
86
128
|
/**
|
|
87
129
|
* @public
|
|
88
130
|
*/
|
|
89
|
-
declare interface RawContent<T = string> {
|
|
131
|
+
export declare interface RawContent<T = string> {
|
|
90
132
|
extension: string;
|
|
91
133
|
raw: T;
|
|
92
134
|
}
|
|
@@ -94,7 +136,7 @@ declare interface RawContent<T = string> {
|
|
|
94
136
|
/**
|
|
95
137
|
* @public
|
|
96
138
|
*/
|
|
97
|
-
declare interface RawCSS {
|
|
139
|
+
export declare interface RawCSS {
|
|
98
140
|
raw: string;
|
|
99
141
|
name?: string;
|
|
100
142
|
}
|
|
@@ -102,63 +144,21 @@ declare interface RawCSS {
|
|
|
102
144
|
/**
|
|
103
145
|
* @public
|
|
104
146
|
*/
|
|
105
|
-
declare type StringRegExpArray = Array<RegExp | string>;
|
|
147
|
+
export declare type StringRegExpArray = Array<RegExp | string>;
|
|
106
148
|
|
|
107
149
|
/**
|
|
108
150
|
* {@inheritDoc purgecss#UserDefinedOptions}
|
|
109
151
|
*
|
|
110
152
|
* @public
|
|
111
153
|
*/
|
|
112
|
-
export declare interface UserDefinedOptions extends Omit<
|
|
113
|
-
content?:
|
|
154
|
+
export declare interface UserDefinedOptions extends Omit<PurgeCSSUserDefinedOptions, "content" | "css"> {
|
|
155
|
+
content?: PurgeCSSUserDefinedOptions["content"];
|
|
114
156
|
contentFunction?: (sourceFile: string) => Array<string | RawContent>;
|
|
115
157
|
}
|
|
116
158
|
|
|
117
|
-
/**
|
|
118
|
-
* Options used by PurgeCSS to remove unused CSS
|
|
119
|
-
*
|
|
120
|
-
* @public
|
|
121
|
-
*/
|
|
122
|
-
declare interface UserDefinedOptions_2 {
|
|
123
|
-
/** {@inheritDoc Options.content} */
|
|
124
|
-
content: Array<string | RawContent>;
|
|
125
|
-
/** {@inheritDoc Options.css} */
|
|
126
|
-
css: Array<string | RawCSS>;
|
|
127
|
-
/** {@inheritDoc Options.defaultExtractor} */
|
|
128
|
-
defaultExtractor?: ExtractorFunction;
|
|
129
|
-
/** {@inheritDoc Options.extractors} */
|
|
130
|
-
extractors?: Array<Extractors>;
|
|
131
|
-
/** {@inheritDoc Options.fontFace} */
|
|
132
|
-
fontFace?: boolean;
|
|
133
|
-
/** {@inheritDoc Options.keyframes} */
|
|
134
|
-
keyframes?: boolean;
|
|
135
|
-
/** {@inheritDoc Options.output} */
|
|
136
|
-
output?: string;
|
|
137
|
-
/** {@inheritDoc Options.rejected} */
|
|
138
|
-
rejected?: boolean;
|
|
139
|
-
/** {@inheritDoc Options.rejectedCss} */
|
|
140
|
-
rejectedCss?: boolean;
|
|
141
|
-
/** {@inheritDoc Options.sourceMap } */
|
|
142
|
-
sourceMap?: boolean | (postcss.SourceMapOptions & { to?: string });
|
|
143
|
-
/** {@inheritDoc Options.stdin} */
|
|
144
|
-
stdin?: boolean;
|
|
145
|
-
/** {@inheritDoc Options.stdout} */
|
|
146
|
-
stdout?: boolean;
|
|
147
|
-
/** {@inheritDoc Options.variables} */
|
|
148
|
-
variables?: boolean;
|
|
149
|
-
/** {@inheritDoc Options.safelist} */
|
|
150
|
-
safelist?: UserDefinedSafelist;
|
|
151
|
-
/** {@inheritDoc Options.blocklist} */
|
|
152
|
-
blocklist?: StringRegExpArray;
|
|
153
|
-
/** {@inheritDoc Options.skippedContentGlobs} */
|
|
154
|
-
skippedContentGlobs?: Array<string>;
|
|
155
|
-
/** {@inheritDoc Options.dynamicAttributes} */
|
|
156
|
-
dynamicAttributes?: string[];
|
|
157
|
-
}
|
|
158
|
-
|
|
159
159
|
/**
|
|
160
160
|
* @public
|
|
161
161
|
*/
|
|
162
|
-
declare type UserDefinedSafelist = StringRegExpArray | ComplexSafelist;
|
|
162
|
+
export declare type UserDefinedSafelist = StringRegExpArray | ComplexSafelist;
|
|
163
163
|
|
|
164
164
|
export { }
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fullhuman/postcss-purgecss",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "6.0.0",
|
|
4
4
|
"description": "PostCSS plugin for PurgeCSS",
|
|
5
5
|
"author": "FoundrySH <no-reply@foundry.sh>",
|
|
6
6
|
"homepage": "https://purgecss.com",
|
|
@@ -27,7 +27,7 @@
|
|
|
27
27
|
"url": "https://github.com/FullHuman/purgecss/issues"
|
|
28
28
|
},
|
|
29
29
|
"dependencies": {
|
|
30
|
-
"purgecss": "^
|
|
30
|
+
"purgecss": "^6.0.0"
|
|
31
31
|
},
|
|
32
32
|
"devDependencies": {
|
|
33
33
|
"postcss": "^8.4.4"
|