0.0.6 • Published 9 years ago

spritemate v0.0.6

Weekly downloads
2
License
MIT
Repository
github
Last release
9 years ago

spritemate

Sprite Mate

Installation

$ npm install spritemate -g

Usage

$ spritemate example/icon1over.png example/icon2over.png -o example/output.png

Result:

npm.io + npm.io = npm.io

And styles:

following is styles:

example/icon1over.png

{
  width: 16px;
  height: 26px;
  background-position: 0 0;
}

example/icon2over.png

{
  width: 16px;
  height: 26px;
  background-position: 0 -26px;
}

Scripting

var mate = require('spritemate');

var images = ['/path/to/image1.png', '/path/to/image2.png'];
var output = '/path/to/output.png';

mate(images, output, function (err, finalName, styles) {
  console.log('generate sprite at: ' + path.relative(path.resolve('.'), finalName).green);
  console.log('');
  console.log('following is styles:');
  for (var file in styles) {
    console.log('');
    console.log(path.relative(path.resolve('.'), file));
    console.log('');
    console.log(format(styles[file]).yellow);
  }
});

License

The MIT License

0.0.6

9 years ago

0.0.5

10 years ago

0.0.4

10 years ago

0.0.3

10 years ago

0.0.2

10 years ago

0.0.1

10 years ago