1.0.5 • Published 8 years ago

mksprite v1.0.5

Weekly downloads
-
License
ISC
Repository
github
Last release
8 years ago

mksprite

Description

Just a simple sprite library

Requirements

  • ImageMagick
  • nodejs 4.6.x (support es6 syntax)

Install

npm i -g mksprite

Using

in image folder to create sprite and css

    mksprite

windows example

    mksprite --sprite="test\result\out.png" --css="test\result\out.css" --web_path="../result/out.png" --source="\test\source" --frame=5

ubuntu example

    mksprite --sprite="test/result/out.png" --css="test/result/out.css" --web_path="/result/out.png" --source="/test/source" --frame=5

Where:

  • --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

1.0.5

8 years ago

1.0.4

8 years ago

1.0.3

8 years ago

1.0.2

9 years ago

1.0.1

9 years ago

1.0.0

9 years ago