Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

gulp-purgecss

Package Overview
Dependencies
Maintainers
2
Versions
46
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

gulp-purgecss - npm Package Compare versions

Comparing version 3.0.0 to 3.1.0-alpha.0

2

lib/gulp-purgecss.esm.js

@@ -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"
}
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc