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

gulp-minify-css

Package Overview
Dependencies
Maintainers
1
Versions
40
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

gulp-minify-css - npm Package Compare versions

Comparing version 0.3.1 to 0.3.2

13

index.js

@@ -5,3 +5,4 @@ var es = require('event-stream'),

BufferStreams = require('bufferstreams'),
gutil = require('gulp-util');
gutil = require('gulp-util'),
path = require('path');

@@ -41,3 +42,13 @@ // File level transform function

// Image URLs are rebased with the assumption that they are relative to the
// CSS file they appear in (unless "relativeTo" option is explicitly set by
// caller)
var relativeToTmp = opt.relativeTo;
opt.relativeTo = relativeToTmp || path.resolve(path.dirname(file.path));
var newContents = new CleanCSS(opt).minify(String(newFile.contents));
// Restore original "relativeTo" value
opt.relativeTo = relativeToTmp;
newFile.contents = new Buffer(newContents);

@@ -44,0 +55,0 @@ cb(null, newFile);

2

package.json
{
"name": "gulp-minify-css",
"description": "Minify css with clean-css.",
"version": "0.3.1",
"version": "0.3.2",
"repository": "https://github.com/jonathanepollack/gulp-minify-css.git",

@@ -6,0 +6,0 @@ "homepage": "https://github.com/jonathanepollack/gulp-minify-css",

@@ -27,8 +27,8 @@ [![Build Status](https://travis-ci.org/jonathanepollack/gulp-minify-css.png?branch=master)](https://travis-ci.org/jonathanepollack/gulp-minify-css)

```js
var minifyCSS = require('gulp-minify-css');
var gulp = require('gulp'),
minifyCSS = require('gulp-minify-css');
gulp.task('minify-css', function() {
gulp.src('./static/css/*.css')
.pipe(minifyCSS(opts))
.pipe(minifyCSS({keepBreaks:true}))
.pipe(gulp.dest('./dist/'))

@@ -35,0 +35,0 @@ });

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