
Research
/Security News
npm Author Qix Compromised via Phishing Email in Major Supply Chain Attack
npm author Qix’s account was compromised, with malicious versions of popular packages like chalk-template, color-convert, and strip-ansi published.
sketch-svg-spriter
Advanced tools
Generate SVG sprites and Css template (underscore template) from your Sketch file
npm install --save-dev sketch-svg-spriter
var SVGSpriter = require('sketch-svg-spriter');
var Spriter = new SVGSpriter({
files: {
sketch: 'src/icons.sketch',
dist: 'dist/icons/'
},
svg: {
padding: 20
},
css: {
template: 'src/scss/icons/template.css',
dist: 'dist/css/icons.css'
},
png: true
})
.generate();
object
string
path to your Sketch file
string
where your svgs will be output
string
filename of your sprite
var opts = {
files: {
src: 'example/src/icons.sketch',
dist: 'example/dist/imgs/svg',
name: 'sprite',
}
};
object
number
space between svgs in sprite
boolean
before the sprite is generated, each icon is exporter has .svg file,
set keepSingle to true
to keep them
var opts = {
svg: {
padding: 0,
keepSingle: false
}
};
object
or false
string
path to your css template
string
where your css will be output
string
classname of sprite items
var opts = {
css: {
template: 'example/assets/template.css',
dist: 'dist/css/icons.css',
className: 'Icon'
}
};
boolean
generate a png fallback of the sprite
var opts = {
png: true
};
boolean
clear dist folder (files.dist
) before generate svgs
var opts = {
clearBeforeGenerate: true
};
boolean
log a message when action is done
var opts = {
silent: false
};
boolean
var opts = {
cacheBusting: false
};
Copyright (c) 2015 Ugo Onali (http://twitter.com/onaliugo)
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
FAQs
Generate a SVG sprite from your Sketch file
The npm package sketch-svg-spriter receives a total of 2 weekly downloads. As such, sketch-svg-spriter popularity was classified as not popular.
We found that sketch-svg-spriter demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
/Security News
npm author Qix’s account was compromised, with malicious versions of popular packages like chalk-template, color-convert, and strip-ansi published.
Research
Four npm packages disguised as cryptographic tools steal developer credentials and send them to attacker-controlled Telegram infrastructure.
Security News
Ruby maintainers from Bundler and rbenv teams are building rv to bring Python uv's speed and unified tooling approach to Ruby development.