gulp-minify-css
Advanced tools
Comparing version 0.3.4 to 0.3.5
24
index.js
@@ -1,6 +0,6 @@ | ||
var es = require('event-stream'), | ||
var path = require('path'), | ||
gutil = require('gulp-util'), | ||
CleanCSS = require('clean-css'), | ||
through2 = require('through2'), | ||
BufferStreams = require('bufferstreams'), | ||
gutil = require('gulp-util'), | ||
path = require('path'), | ||
cache = require('memory-cache'); | ||
@@ -59,10 +59,12 @@ | ||
function modifyContents(file, cb){ | ||
if(file.isNull()) return cb(null, file); | ||
function modifyContents(file, enc, done){ | ||
if(file.isNull()) { | ||
done(null, file); | ||
return; | ||
} | ||
if(file.isStream()) { | ||
file.contents = file.contents.pipe(new BufferStreams(minifyCSSTransform(opt, file))); | ||
return cb(null, file); | ||
done(null, file); | ||
return; | ||
} | ||
@@ -82,8 +84,8 @@ | ||
opt.relativeTo = relativeToTmp; | ||
newFile.contents = new Buffer(newContents); | ||
newFile.contents = new Buffer(newContents); | ||
cb(null, newFile); | ||
done(null, newFile); | ||
} | ||
return es.map(modifyContents); | ||
return through2.obj(modifyContents); | ||
} | ||
@@ -90,0 +92,0 @@ |
{ | ||
"name": "gulp-minify-css", | ||
"description": "Minify css with clean-css.", | ||
"version": "0.3.4", | ||
"version": "0.3.5", | ||
"repository": "https://github.com/jonathanepollack/gulp-minify-css.git", | ||
@@ -14,6 +14,6 @@ "homepage": "https://github.com/jonathanepollack/gulp-minify-css", | ||
"dependencies": { | ||
"event-stream": "~3.1.0", | ||
"clean-css": "~2.1.8", | ||
"gulp-util": "~2.2.13", | ||
"clean-css": "~2.2.1", | ||
"through2": "^0.5.1", | ||
"bufferstreams": "0.0.1", | ||
"gulp-util": "~2.2.13", | ||
"memory-cache": "0.0.5" | ||
@@ -31,3 +31,4 @@ }, | ||
"gulp": "~3.5.0", | ||
"proxyquire": "^0.6.0" | ||
"proxyquire": "^0.6.0", | ||
"event-stream": "~3.1.0" | ||
}, | ||
@@ -34,0 +35,0 @@ "licenses": [ |
@@ -21,3 +21,3 @@ [![Build Status](https://travis-ci.org/jonathanepollack/gulp-minify-css.png?branch=master)](https://travis-ci.org/jonathanepollack/gulp-minify-css) | ||
``` | ||
npm install --save gulp-minify-css | ||
npm install --save-dev gulp-minify-css | ||
``` | ||
@@ -24,0 +24,0 @@ |
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
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
13300
299
5
+ Addedthrough2@^0.5.1
+ Addedclean-css@2.2.23(transitive)
+ Addedcommander@2.2.0(transitive)
- Removedevent-stream@~3.1.0
- Removedclean-css@2.1.8(transitive)
- Removedcommander@2.1.0(transitive)
- Removedduplexer@0.1.2(transitive)
- Removedevent-stream@3.1.7(transitive)
- Removedfrom@0.1.7(transitive)
- Removedmap-stream@0.1.0(transitive)
- Removedpause-stream@0.0.11(transitive)
- Removedsplit@0.2.10(transitive)
- Removedstream-combiner@0.0.4(transitive)
- Removedthrough@2.3.8(transitive)
Updatedclean-css@~2.2.1