gulp-purgecss
Advanced tools
Comparing version 3.0.0 to 3.1.0-alpha.0
@@ -1,1 +0,1 @@ | ||
import e from"through2";import r from"plugin-error";import t from"glob";import n from"purgecss";function o(o){return e.obj((async function(e,s,c){if(e.isNull())return c(null,e);if(e.isBuffer())try{const r={...o,content:(i=o.content,i.reduce((e,r)=>[...e,...t.sync(r)],[])),css:[{raw:e.contents.toString()}],stdin:!0},s=(await(new n).purge(r))[0],u=r.rejected&&s.rejected?s.rejected.join(" {}\n")+" {}":s.css;e.contents=Buffer.from(u,"utf-8"),c(null,e)}catch(e){this.emit("error",new r("gulp-purgecss",e.message))}var i;if(e.isStream()){const t=e;let s="";t.on("readable",e=>{s+=e.read().toString()}).on("end",async()=>{try{const r={...o,css:[s]},i=(await(new n).purge(r))[0],u=r.rejected&&i.rejected?i.rejected.join(" {}\n")+" {}":i.css;t.contents=Buffer.from(u,"utf-8"),c(null,e)}catch(e){this.emit("error",new r("gulp-purgecss",e.message))}})}}))}export default o; | ||
import e from"through2";import r from"plugin-error";import t from"glob";import n from"purgecss";function o(o){return e.obj((async function(e,s,c){if(e.isNull())return c(null,e);if(e.isBuffer())try{const r={...o,content:(i=o.content,i.reduce(((e,r)=>[...e,...t.sync(r)]),[])),css:[{raw:e.contents.toString()}],stdin:!0},s=(await(new n).purge(r))[0],u=r.rejected&&s.rejected?s.rejected.join(" {}\n")+" {}":s.css;e.contents=Buffer.from(u,"utf-8"),c(null,e)}catch(e){this.emit("error",new r("gulp-purgecss",e.message))}var i;if(e.isStream()){const t=e;let s="";t.on("readable",(e=>{s+=e.read().toString()})).on("end",(async()=>{try{const r={...o,css:[s]},i=(await(new n).purge(r))[0],u=r.rejected&&i.rejected?i.rejected.join(" {}\n")+" {}":i.css;t.contents=Buffer.from(u,"utf-8"),c(null,e)}catch(e){this.emit("error",new r("gulp-purgecss",e.message))}}))}}))}export default o; |
@@ -1,1 +0,1 @@ | ||
"use strict";var e=require("through2"),t=require("plugin-error"),r=require("glob"),n=require("purgecss");function u(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var s=u(e),c=u(t),o=u(r),i=u(n);module.exports=function(e){return s.default.obj((async function(t,r,n){if(t.isNull())return n(null,t);if(t.isBuffer())try{const r={...e,content:(u=e.content,u.reduce((e,t)=>[...e,...o.default.sync(t)],[])),css:[{raw:t.contents.toString()}],stdin:!0},s=(await(new i.default).purge(r))[0],c=r.rejected&&s.rejected?s.rejected.join(" {}\n")+" {}":s.css;t.contents=Buffer.from(c,"utf-8"),n(null,t)}catch(e){this.emit("error",new c.default("gulp-purgecss",e.message))}var u;if(t.isStream()){const r=t;let u="";r.on("readable",e=>{u+=e.read().toString()}).on("end",async()=>{try{const s={...e,css:[u]},c=(await(new i.default).purge(s))[0],o=s.rejected&&c.rejected?c.rejected.join(" {}\n")+" {}":c.css;r.contents=Buffer.from(o,"utf-8"),n(null,t)}catch(e){this.emit("error",new c.default("gulp-purgecss",e.message))}})}}))}; | ||
"use strict";var e=require("through2"),t=require("plugin-error"),r=require("glob"),n=require("purgecss");function u(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var s=u(e),c=u(t),o=u(r),i=u(n);module.exports=function(e){return s.default.obj((async function(t,r,n){if(t.isNull())return n(null,t);if(t.isBuffer())try{const r={...e,content:(u=e.content,u.reduce(((e,t)=>[...e,...o.default.sync(t)]),[])),css:[{raw:t.contents.toString()}],stdin:!0},s=(await(new i.default).purge(r))[0],c=r.rejected&&s.rejected?s.rejected.join(" {}\n")+" {}":s.css;t.contents=Buffer.from(c,"utf-8"),n(null,t)}catch(e){this.emit("error",new c.default("gulp-purgecss",e.message))}var u;if(t.isStream()){const r=t;let u="";r.on("readable",(e=>{u+=e.read().toString()})).on("end",(async()=>{try{const s={...e,css:[u]},c=(await(new i.default).purge(s))[0],o=s.rejected&&c.rejected?c.rejected.join(" {}\n")+" {}":c.css;r.contents=Buffer.from(o,"utf-8"),n(null,t)}catch(e){this.emit("error",new c.default("gulp-purgecss",e.message))}}))}}))}; |
{ | ||
"name": "gulp-purgecss", | ||
"version": "3.0.0", | ||
"version": "3.1.0-alpha.0", | ||
"description": "Gulp plugin for purgecss", | ||
@@ -40,3 +40,3 @@ "author": "Ffloriel", | ||
"plugin-error": "^1.0.1", | ||
"purgecss": "^3.0.0", | ||
"purgecss": "^3.1.0-alpha.0", | ||
"through2": "^4.0.1" | ||
@@ -52,3 +52,3 @@ }, | ||
}, | ||
"gitHead": "4a2a9504a41fe361f5aa36f3a2e50eabee84aec0" | ||
"gitHead": "f5e4427dfd9ba3ea5ad3e75f3c51d4e73922cc16" | ||
} |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
9894
2
Updatedpurgecss@^3.1.0-alpha.0