https://github.com/differui/ruhua
Generate and minify CSS sprite images.
https://github.com/differui/ruhua
Last synced: 8 months ago
JSON representation
Generate and minify CSS sprite images.
- Host: GitHub
- URL: https://github.com/differui/ruhua
- Owner: differui
- Created: 2016-03-13T12:10:41.000Z (almost 10 years ago)
- Default Branch: master
- Last Pushed: 2016-05-11T05:49:00.000Z (over 9 years ago)
- Last Synced: 2025-05-27T06:09:27.360Z (8 months ago)
- Language: JavaScript
- Size: 7.81 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
**ruhua** - A handy sprite generator for commend line.
=====

> 大爷,经常来玩哦。
## Install
You can get **ruhua** via npm:
```
$ npm install -g ruhua
```
## Usage
```bash
Usage
$ ruhua ...
$ ruhua --css --img
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