Socket
Socket
Sign inDemoInstall

gulp-svgmin

Package Overview
Dependencies
Maintainers
1
Versions
36
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

gulp-svgmin - npm Package Compare versions

Comparing version 0.2.0 to 0.2.1

.editorconfig

9

index.js

@@ -14,3 +14,3 @@ /* jshint node:true */

if(!(svgo instanceof SVGOptim)) {
if (!(svgo instanceof SVGOptim)) {
svgo = new SVGOptim(svgo);

@@ -23,3 +23,5 @@ }

// Handle any error
if(err) cb(gutil.PluginError('svgmin', err));
if (err) {
cb(gutil.PluginError('svgmin', err));
}

@@ -41,7 +43,6 @@ // Use the buffered content

var stream = new Transform({objectMode: true});
var svgo = new SVGOptim({ plugins: [plugins] });
stream._transform = function(file, unused, done) {
if(file.isStream()) {
if (file.isStream()) {
file.contents = file.contents.pipe(

@@ -48,0 +49,0 @@ new BufferStreams(minifySVGTransform(svgo)));

{
"name": "gulp-svgmin",
"version": "0.2.0",
"version": "0.2.1",
"description": "Minify SVG files with gulp.",

@@ -5,0 +5,0 @@ "license": "MIT",

/* jshint node: true */
/* global describe, it, before, beforeEach, after, afterEach */
/* global describe, it */

@@ -24,3 +24,3 @@ 'use strict';

var stream = svgmin();
stream.on('data', function(data) {

@@ -30,3 +30,3 @@ expect(String(data.contents)).to.equal(compressed);

});
stream.write(new gutil.File({

@@ -36,3 +36,3 @@ contents: new Buffer(raw)

});
it('should honor disabling plugins, such as keeping the doctype', function(cb) {

@@ -42,3 +42,3 @@ var stream = svgmin({

});
stream.on('data', function(data) {

@@ -48,3 +48,3 @@ expect(String(data.contents)).to.have.string(doctype);

});
stream.write(new gutil.File({

@@ -62,3 +62,3 @@ contents: new Buffer(raw)

});
stream.on('data', function(data) {

@@ -70,3 +70,3 @@ data.contents.pipe(es.wait(function(err, data) {

});
stream.write(fakeFile);

@@ -76,3 +76,3 @@ fakeFile.contents.write(raw);

});
it('should honor disabling plugins, such as keeping the doctype', function(cb) {

@@ -85,3 +85,3 @@ var stream = svgmin({

});
stream.on('data', function(data) {

@@ -93,3 +93,3 @@ data.contents.pipe(es.wait(function(err, data) {

});
stream.write(fakeFile);

@@ -96,0 +96,0 @@ fakeFile.contents.write(raw);

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