ruhua
v0.2.2
Published
Generate and minify CSS sprite images.
Downloads
3
Readme
ruhua - A handy sprite generator for commend line.
大爷,经常来玩哦。
Install
You can get ruhua via npm:
$ npm install -g ruhua
Usage
Usage
$ ruhua <file> <file> ... <file>
$ ruhua <directory> --css <output> --img <output>
Options
-c, --css Output css
-i, --img Output img
-r, --ratio CSS resize ratio (2x/0.5, 3x/0.33, 4x/0.25)
-R, --recursive Attemp to read image recursively
-v, --verbose Log error message
-p, --pad Add padding between images
Examples
$ ruhua sprites/
$ ruhua sprites/ --css dist/sprite.css --img dist/sprite.png
$ ruhua sprites/ --ratio .5 --pad 5
ruhua will search icons in CWD if run without after arguments. Stylesheet and image will be created in it if run without dest path.
$ ruhua
ruhua allows you to generate sprite image for retina device.The way is to take relative CSS property multipled a ratio number.
$ ruhua -r 0.5 # Generate sprite image for 2X retina device
License
MIT