1.0.5 • Published 9 years ago
mksprite v1.0.5
mksprite
Description
Just a simple sprite library
Requirements
- ImageMagick
- nodejs 4.6.x (support es6 syntax)
Install
npm i -g mkspriteUsing
in image folder to create sprite and css
mkspritewindows example
mksprite --sprite="test\result\out.png" --css="test\result\out.css" --web_path="../result/out.png" --source="\test\source" --frame=5ubuntu example
mksprite --sprite="test/result/out.png" --css="test/result/out.css" --web_path="/result/out.png" --source="/test/source" --frame=5Where:
--sprite="test\result\out.png"- result sprite--css="test\result\out.css"- result css file--web_path="/result/out.png"- background image url--source="\test\source"- source of images (not recursive now, find all just in root)--frame=5- each image margin in sprite--selector=".img"- selector pattern (will make .imgfile-name { ... } style)
PS
paths are relative to current directory
i.e we currently at /var/www then mksprite --source="images/source" will find all at /var/www/images/source and put into /var/out.png