svg2png (which this package wraps) now includes its own CLI, so you should probably just use it directly instead
This module is a (very thin) command line wrapper around domenic's svg2png. Use it to convert SVGs to PNGs from your command line like: $ svg2png --scale 2.0 --out /png/dir -- svg1.svg svg2.svg
$ npm install -g svg2png-command
$ svg2png [options] -- files_or_glob
Default output directory is the directory the SVGs live in and the default output filename is the same filename with .svg
replaced with .png
flag | parameter | description |
---|---|---|
-o, --out | path | Output directory |
-s, --scale | float | Scales the PNG |
-h, --help | N/A | Outputs the help text |
A command line tool called svg2png
already exists in the world, and you may have it installed if you've found yourself frequently trying to convert SVGs to PNGs. You may need to uninstall it to get everything to work. I wouldn't worry too much though; domenic's PhantomJS-based converter tends to be better than any other tool.
$ npm test