@info.nl/svg-symbol
v0.1.0
Published
File system based SVG symbol 'sprite' generator.
Downloads
3
Readme
@info.nl/svg-symbol
File system based SVG symbol 'sprite' generator.
Installation
$ npm install @info.nl/svg-symbol
Configuration
package.json
config options (defaults):
{
"config": {
"@info.nl/svg-symbol": {
"source": "./source/vector/symbol",
"target": {
"image": "./public/image",
"style": "./source/style/include/svg-symbol"
}
}
}
}
Example
Given the above default configuration, the following folder structure
- ./source/vector/symbol/
- ./chart/
- bar.svg
- pie.svg
- ./icon/
- home.svg
- search.svg
- ./chart/
generates the files
./public/
- ./image/
- ./chart.svg
- contains two symbols with the
id
schart-bar
chart-pie
- contains two symbols with the
- ./icon.svg
- contains two symbols with the
id
sicon-home
icon-search
- contains two symbols with the
- ./chart.svg
- ./image/
./source/style/svg-sprite/
- ./chart.css
- contains two rulesets with the selectors
.svg-chart-bar
.svg-chart-bar
- contains two rulesets with the selectors
- ./icon.css
- contains two rulesets with the selectors
.svg-icon-home
.svg-icon-search
- contains two rulesets with the selectors
- ./chart.css
License
MIT