gulp-svgstore
Advanced tools
Comparing version 0.0.3 to 0.0.4
@@ -9,5 +9,9 @@ var svgstore = require('./index') | ||
.pipe(svgmin()) | ||
.pipe(svgstore({fileName: 'icons.svg', prefix: 'icon-', onlySvg: true})) | ||
.pipe(svgstore({ fileName: 'icons.svg' | ||
, prefix: 'icon-' | ||
, onlySvg: true | ||
, emptyFills: true | ||
})) | ||
.pipe(gulp.dest('test/')) | ||
}) |
@@ -15,2 +15,4 @@ 'use strict'; | ||
var onlySvg = config.onlySvg || false | ||
var emptyFills = config.emptyFills || false | ||
var combinedDoc = new libxml.Document() | ||
@@ -43,2 +45,8 @@ var svg = combinedDoc.node('svg') | ||
if (emptyFills) { | ||
combinedDoc.find('//*[@fill="none"]').forEach(function (child) { | ||
child.attr('fill').remove() | ||
}) | ||
} | ||
this.push(new gutil.File({ | ||
@@ -45,0 +53,0 @@ path: fileName |
{ | ||
"name": "gulp-svgstore", | ||
"version": "0.0.3", | ||
"version": "0.0.4", | ||
"description": "Combine svg files into one with defs", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -11,4 +11,4 @@ gulp-svgstore | ||
* onlySvg — output only `<svg>` element without `<?xml ?>` and `DOCTYPE` | ||
* emptyFills - remove all fill="none" so they can be changed in css | ||
## Usage | ||
@@ -15,0 +15,0 @@ |
Sorry, the diff of this file is not supported yet
5182
55