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

gulp-svg-to-css

Package Overview
Dependencies
Maintainers
1
Versions
18
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

gulp-svg-to-css - npm Package Compare versions

Comparing version 1.0.10 to 1.1.0

.idea/.name

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.0",
"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

@@ -76,7 +76,5 @@

```mustache
{{#items}}
.{{prefix}}{{filename}}{{postfix}},
.{{prefix}}{{filename}}{{postfix}}-before:before,
.{{prefix}}{{filename}}{{postfix}}-after:after{background-image:url('{{{dataurl}}}')}
{{/items}}
.{{prefix}}{{filename}}{{postfix}},
.{{prefix}}{{filename}}{{postfix}}-before:before,
.{{prefix}}{{filename}}{{postfix}}-after:after{background-image:url('{{{dataurl}}}')}
```

@@ -96,6 +94,3 @@

name: 'vars.styl',
template:
"{{#items}}" +
"{{filename}} = '{{dataurl}}'" +
"{{/items}}"
template: "{{filename}} = '{{dataurl}}'"
})

@@ -102,0 +97,0 @@ .pipe(stylus())

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

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