gulp-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/gulp-purgecss.d.ts +17 -17
- package/lib/gulp-purgecss.esm.js +1 -1
- package/lib/gulp-purgecss.js +1 -1
- package/package.json +7 -7
package/lib/gulp-purgecss.d.ts
CHANGED
|
@@ -110,39 +110,39 @@ export declare interface UserDefinedOptions extends Omit<UserDefinedOptions_2, "
|
|
|
110
110
|
* @public
|
|
111
111
|
*/
|
|
112
112
|
declare interface UserDefinedOptions_2 {
|
|
113
|
-
/** {@inheritDoc Options.content} */
|
|
113
|
+
/** {@inheritDoc purgecss#Options.content} */
|
|
114
114
|
content: Array<string | RawContent>;
|
|
115
|
-
/** {@inheritDoc Options.css} */
|
|
115
|
+
/** {@inheritDoc purgecss#Options.css} */
|
|
116
116
|
css: Array<string | RawCSS>;
|
|
117
|
-
/** {@inheritDoc Options.defaultExtractor} */
|
|
117
|
+
/** {@inheritDoc purgecss#Options.defaultExtractor} */
|
|
118
118
|
defaultExtractor?: ExtractorFunction;
|
|
119
|
-
/** {@inheritDoc Options.extractors} */
|
|
119
|
+
/** {@inheritDoc purgecss#Options.extractors} */
|
|
120
120
|
extractors?: Array<Extractors>;
|
|
121
|
-
/** {@inheritDoc Options.fontFace} */
|
|
121
|
+
/** {@inheritDoc purgecss#Options.fontFace} */
|
|
122
122
|
fontFace?: boolean;
|
|
123
|
-
/** {@inheritDoc Options.keyframes} */
|
|
123
|
+
/** {@inheritDoc purgecss#Options.keyframes} */
|
|
124
124
|
keyframes?: boolean;
|
|
125
|
-
/** {@inheritDoc Options.output} */
|
|
125
|
+
/** {@inheritDoc purgecss#Options.output} */
|
|
126
126
|
output?: string;
|
|
127
|
-
/** {@inheritDoc Options.rejected} */
|
|
127
|
+
/** {@inheritDoc purgecss#Options.rejected} */
|
|
128
128
|
rejected?: boolean;
|
|
129
|
-
/** {@inheritDoc Options.rejectedCss} */
|
|
129
|
+
/** {@inheritDoc purgecss#Options.rejectedCss} */
|
|
130
130
|
rejectedCss?: boolean;
|
|
131
|
-
/** {@inheritDoc Options.sourceMap } */
|
|
131
|
+
/** {@inheritDoc purgecss#Options.sourceMap } */
|
|
132
132
|
sourceMap?: boolean | (postcss.SourceMapOptions & { to?: string });
|
|
133
|
-
/** {@inheritDoc Options.stdin} */
|
|
133
|
+
/** {@inheritDoc purgecss#Options.stdin} */
|
|
134
134
|
stdin?: boolean;
|
|
135
|
-
/** {@inheritDoc Options.stdout} */
|
|
135
|
+
/** {@inheritDoc purgecss#Options.stdout} */
|
|
136
136
|
stdout?: boolean;
|
|
137
|
-
/** {@inheritDoc Options.variables} */
|
|
137
|
+
/** {@inheritDoc purgecss#Options.variables} */
|
|
138
138
|
variables?: boolean;
|
|
139
|
-
/** {@inheritDoc Options.safelist} */
|
|
139
|
+
/** {@inheritDoc purgecss#Options.safelist} */
|
|
140
140
|
safelist?: UserDefinedSafelist;
|
|
141
|
-
/** {@inheritDoc Options.blocklist} */
|
|
141
|
+
/** {@inheritDoc purgecss#Options.blocklist} */
|
|
142
142
|
blocklist?: StringRegExpArray;
|
|
143
|
-
/** {@inheritDoc Options.skippedContentGlobs} */
|
|
143
|
+
/** {@inheritDoc purgecss#Options.skippedContentGlobs} */
|
|
144
144
|
skippedContentGlobs?: Array<string>;
|
|
145
|
-
/** {@inheritDoc Options.dynamicAttributes} */
|
|
145
|
+
/** {@inheritDoc purgecss#Options.dynamicAttributes} */
|
|
146
146
|
dynamicAttributes?: string[];
|
|
147
147
|
}
|
|
148
148
|
|
package/lib/gulp-purgecss.esm.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import*as e from"glob";import r from"plugin-error";import{PurgeCSS as t}from"purgecss";import o from"through2";import n from"vinyl-sourcemaps-apply";function
|
|
1
|
+
import*as e from"glob";import r from"plugin-error";import{PurgeCSS as t}from"purgecss";import o from"through2";import n from"vinyl-sourcemaps-apply";const s="gulp-purgecss";function c(c){return o.obj((async function(i,a,u){if(i.isNull())return u(null,i);if(i.isBuffer())try{const r={...c,content:(p=c.content,f=c.skippedContentGlobs,p.reduce(((r,t)=>[...r,...e.sync(t,{ignore:f})]),[])),css:[{raw:i.contents.toString()}],stdin:!0,sourceMap:!!i.sourceMap},o=(await(new t).purge(r))[0],s=r.rejected&&o.rejected?o.rejected.join(" {}\n")+" {}":o.css;i.contents=Buffer.from(s,"utf-8"),i.sourceMap&&n(i,o.sourceMap),u(null,i)}catch(e){e instanceof Error&&this.emit("error",new r(s,e.message))}var p,f;if(i.isStream()){let e="";i.contents.on("data",(r=>{e+=r.toString()})).on("end",(async()=>{try{const r={...c,css:[{raw:e}],sourceMap:!!i.sourceMap},s=(await(new t).purge(r))[0],a=r.rejected&&s.rejected?s.rejected.join(" {}\n")+" {}":s.css,p=o();p.write(Buffer.from(a,"utf-8")),i.contents=i.contents.pipe(p),i.sourceMap&&n(i,s.sourceMap),u(null,i)}catch(e){e instanceof Error&&this.emit("error",new r(s,e.message))}}))}}))}export{c as default};
|
package/lib/gulp-purgecss.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var e=require("glob"),r=require("plugin-error"),t=require("purgecss"),n=require("through2"),u=require("vinyl-sourcemaps-apply");function c(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}function o(e){if(e&&e.__esModule)return e;var r=Object.create(null);return e&&Object.keys(e).forEach((function(t){if("default"!==t){var n=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(r,t,n.get?n:{enumerable:!0,get:function(){return e[t]}})}})),r.default=e,Object.freeze(r)}var s=o(e),a=c(r),i=c(n),f=c(u);module.exports=function(e){return i.default.obj((async function(r,n,u){if(r.isNull())return u(null,r);if(r.isBuffer())try{const n={...e,content:(c=e.content,o=e.skippedContentGlobs,c.reduce(((e,r)=>[...e,...s.sync(r,{ignore:o})]),[])),css:[{raw:r.contents.toString()}],stdin:!0,sourceMap:!!r.sourceMap},a=(await(new t.PurgeCSS).purge(n))[0],i=n.rejected&&a.rejected?a.rejected.join(" {}\n")+" {}":a.css;r.contents=Buffer.from(i,"utf-8"),r.sourceMap&&f.default(r,a.sourceMap),u(null,r)}catch(e){e instanceof Error&&this.emit("error",new a.default(
|
|
1
|
+
"use strict";var e=require("glob"),r=require("plugin-error"),t=require("purgecss"),n=require("through2"),u=require("vinyl-sourcemaps-apply");function c(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}function o(e){if(e&&e.__esModule)return e;var r=Object.create(null);return e&&Object.keys(e).forEach((function(t){if("default"!==t){var n=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(r,t,n.get?n:{enumerable:!0,get:function(){return e[t]}})}})),r.default=e,Object.freeze(r)}var s=o(e),a=c(r),i=c(n),f=c(u);const l="gulp-purgecss";module.exports=function(e){return i.default.obj((async function(r,n,u){if(r.isNull())return u(null,r);if(r.isBuffer())try{const n={...e,content:(c=e.content,o=e.skippedContentGlobs,c.reduce(((e,r)=>[...e,...s.sync(r,{ignore:o})]),[])),css:[{raw:r.contents.toString()}],stdin:!0,sourceMap:!!r.sourceMap},a=(await(new t.PurgeCSS).purge(n))[0],i=n.rejected&&a.rejected?a.rejected.join(" {}\n")+" {}":a.css;r.contents=Buffer.from(i,"utf-8"),r.sourceMap&&f.default(r,a.sourceMap),u(null,r)}catch(e){e instanceof Error&&this.emit("error",new a.default(l,e.message))}var c,o;if(r.isStream()){let n="";r.contents.on("data",(e=>{n+=e.toString()})).on("end",(async()=>{try{const c={...e,css:[{raw:n}],sourceMap:!!r.sourceMap},o=(await(new t.PurgeCSS).purge(c))[0],s=c.rejected&&o.rejected?o.rejected.join(" {}\n")+" {}":o.css,a=i.default();a.write(Buffer.from(s,"utf-8")),r.contents=r.contents.pipe(a),r.sourceMap&&f.default(r,o.sourceMap),u(null,r)}catch(e){e instanceof Error&&this.emit("error",new a.default(l,e.message))}}))}}))};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "gulp-purgecss",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "6.0.0",
|
|
4
4
|
"description": "Gulp plugin for purgecss",
|
|
5
5
|
"author": "Ffloriel",
|
|
6
6
|
"homepage": "https://purgecss.com",
|
|
@@ -36,19 +36,19 @@
|
|
|
36
36
|
"test": "jest"
|
|
37
37
|
},
|
|
38
38
|
"dependencies": {
|
|
39
|
-
"glob": "^
|
|
39
|
+
"glob": "^10.3.10",
|
|
40
40
|
"plugin-error": "^2.0.0",
|
|
41
|
-
"purgecss": "^
|
|
42
|
-
"through2": "^4.0.1"
|
|
41
|
+
"purgecss": "^6.0.0",
|
|
42
|
+
"through2": "^4.0.1",
|
|
43
|
+
"vinyl-sourcemaps-apply": "^0.2.1"
|
|
43
44
|
},
|
|
44
45
|
"devDependencies": {
|
|
45
46
|
"@types/event-stream": "^4.0.0",
|
|
46
|
-
"@types/glob": "^
|
|
47
|
+
"@types/glob": "^8.0.0",
|
|
47
48
|
"@types/through2": "^2.0.34",
|
|
48
49
|
"@types/vinyl": "^2.0.4",
|
|
49
50
|
"event-stream": "^4.0.1",
|
|
50
|
-
"vinyl": "^
|
|
51
|
-
"vinyl-sourcemaps-apply": "^0.2.1"
|
|
51
|
+
"vinyl": "^3.0.0"
|
|
52
52
|
},
|
|
53
53
|
"bugs": {
|
|
54
54
|
"url": "https://github.com/FullHuman/purgecss/issues"
|