svgreindeer

0.4.3 • Public • Published

SvgRenindeer

This little tools lets you render a folder of SVG's into PNG's.

The conversion part is based on the svg2png from @domenic.

Usage

> svgreindeer [input_src] -o [output_dir]

  # custom scaling
> svgreindeer [input_src] -o [output_dir] -s [scale|0.1÷4]

  # remove base dir from output
> svgreindeer [input_src] -o [output_dir] -b [base_dir] -s [scale|0.1÷4]

  # custom style
> svgreindeer [input_src] -o [output_dir] --style='* { fill: chocolate; }'

Config

Place a svgreindeer.yml within your EXECUTION folder.

verbose: true
input_src: [input_src]
output_dir: [output_dir]
base_dir: [base_dir]
scale: [scale|0.1÷4]
style: |
  * { fill: chocolate; }

Feel free to hide your config file by adding a . in front of the filename.

Custom styles

You can set a global custom style that is injected into the svg before rendering. Additionally you can specify a FOLDER_NAME.css or FILE_NAME.svg.css file.

example:

.
├── icons
│   ├── icon-arrow.svg
│   ├── icon-arrow.svg
│   ├── icon-bubble.svg
│   ├── icon-clock.svg
│   └── icon-clock.svg.css
└── icons.css

About

Feedback welcome! Contact me @bennyschudel or follow me on twitter.

Copyright (c) 2014 Benny Schudel - MIT-License

Readme

Keywords

Package Sidebar

Install

npm i svgreindeer

Weekly Downloads

1

Version

0.4.3

License

none

Last publish

Collaborators

  • bennyschudel