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

svg-sprite-loader

Package Overview
Dependencies
Maintainers
2
Versions
131
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

svg-sprite-loader - npm Package Compare versions

Comparing version 0.0.20 to 0.0.21

lib/extract-svg-plugin.js

4

config.js

@@ -11,2 +11,3 @@ var path = require('path');

* @property {String} [spriteModule] Sprite module name. You can define your own sprite module based on `./lib/web/sprite`.
* @property {Boolean} [extract] Extract mode
*/

@@ -18,3 +19,4 @@

prefixize: true,
spriteModule: path.resolve(__dirname, 'lib/web/global-sprite')
spriteModule: path.resolve(__dirname, 'lib/web/global-sprite'),
extract: false
};

@@ -48,9 +48,16 @@ var path = require('path');

content = doc.toString(SVGDoc.OUTPUT_FORMAT.SYMBOL);
var output;
return [
config.angularBaseWorkaround ? 'require("' + path.resolve(__dirname, 'lib/web/angular-base-workaround').replace(/\\/g, "/") + '");' : '',
'var sprite = require("' + config.spriteModule.replace(/\\/g, "/") + '");',
'var image = ' + JSON.stringify(content),
'module.exports = sprite.add(image, "' + id + '");'
].join(';\n');
if (config.extract) {
output = ['module.exports = ' + JSON.stringify(content) + ';'];
} else {
output = [
config.angularBaseWorkaround ? 'require("' + path.resolve(__dirname, 'lib/web/angular-base-workaround').replace(/\\/g, "/") + '");' : '',
'var sprite = require("' + config.spriteModule.replace(/\\/g, "/") + '");',
'var image = ' + JSON.stringify(content) + ';',
'module.exports = sprite.add(image, "' + id + '");'
];
}
return output.join('\n');
};
{
"name": "svg-sprite-loader",
"version": "0.0.20",
"version": "0.0.21",
"description": "SVG sprite webpack loader",

@@ -5,0 +5,0 @@ "main": "index.js",

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