gulp-svg-to-css
Advanced tools
Comparing version 1.0.10 to 1.1.10
18
index.js
@@ -1,2 +0,2 @@ | ||
var Mustache, SVGO, Vinyl, fs, gutil, path, svgo, through2; | ||
var Mustache, SVGO, Vinyl, createTemplate, fs, gutil, path, svgo, through2; | ||
@@ -19,2 +19,7 @@ through2 = require('through2'); | ||
createTemplate = function(template) { | ||
template = "{{#items}}" + template + "\r\n{{/items}}"; | ||
return template; | ||
}; | ||
module.exports = function(opts) { | ||
@@ -30,5 +35,2 @@ var eachFile, endStream, parsedData; | ||
} | ||
if (opts.template == null) { | ||
opts.template = fs.readFileSync(__dirname + '/template.mustache', 'utf8'); | ||
} | ||
if (opts.name == null) { | ||
@@ -43,2 +45,5 @@ opts.name = 'svg.css'; | ||
} | ||
if (opts.template == null) { | ||
opts.template = fs.readFileSync(__dirname + '/template.mustache', 'utf8'); | ||
} | ||
parsedData = { | ||
@@ -72,4 +77,5 @@ items: [], | ||
endStream = function(callback) { | ||
var buffer, cssCode; | ||
cssCode = Mustache.render(opts.template, parsedData); | ||
var buffer, cssCode, template; | ||
template = createTemplate(opts.template); | ||
cssCode = Mustache.render(template, parsedData); | ||
buffer = new Buffer(cssCode, 'utf8'); | ||
@@ -76,0 +82,0 @@ this.push(new Vinyl({ |
{ | ||
"name": "gulp-svg-to-css", | ||
"version": "1.0.10", | ||
"version": "1.1.10", | ||
"description": "Packs svg files in css sprite inline", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
gulp-svg-to-css | ||
=== | ||
Plugin for gulp | ||
Plugin for gulp: Packs svg files in css sprite inline | ||
@@ -5,0 +5,0 @@ |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
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
36418
19
75