Skip to content

A live version of node-spritesheet. It will listen to files changes on a src folder

Notifications You must be signed in to change notification settings

stefanoortisi/live-spritesheet

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

28 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Live Spritesheet

Live Spritesheet is a extension for node-spritesheet node module.

It watches into the src folder and compile the new spritesheet whenever some files change occurs.

Requirements

Requires ImageMagick, available via HomeBrew ($ sudo brew install ImageMagick) or MacPorts: ($ sudo port install ImageMagick).

You may need to install xquartz. A popup will be shown if required.

Installation

make install

Usage

bin/live-spritesheet -c <your_config>.json

config.json

A config file looks such as:

{
	"src_image_folder"		: "./src",
	"output_css_folder"  	: "./output/css",
	"output_image_folder"	: "./output/images",
	"selector"  			: ".sprite",
	"output_css"  	 		: "sprite.css",
	"output_image"  		: "sprite.png",
	"output_image_retina"	: "sprite-retina.png"
}

Where:

  • src_image_folder (path)
  • output_css_folder (path)
  • output_image_folder (path)
  • selector (css selector)
  • output_css (filename)
  • output_image (filename)
  • output_image_retina (filename)

TODO

  • Improve error management (when files in config.json dont't exist)

About

A live version of node-spritesheet. It will listen to files changes on a src folder

Resources

Stars

Watchers

Forks

Packages

No packages published