Created
June 27, 2014 17:48
-
-
Save markthethomas/4f51bfe3e6444c1d9c15 to your computer and use it in GitHub Desktop.
Quick grunt-spritesmith config
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//.......... | |
sprite: { | |
all: { | |
src: 'app/images/FILE_PATH_HERE/*.png', | |
destImg: 'app/images/spritesheet.png', | |
destCSS: 'app/styles/_sprites.scss', | |
'padding': 5, | |
'cssFormat': 'css', | |
// OPTIONAL: Map variable of each sprite | |
'cssVarMap': function(sprite) { | |
// `sprite` has `name`, `image` (full path), `x`, `y` | |
// `width`, `height`, `total_width`, `total_height` | |
// EXAMPLE: Prefix all sprite names with 'sprite-' | |
sprite.name = 'sprite-' + sprite.name; | |
}, | |
} | |
} | |
//.......... | |
grunt.loadNpmTasks('grunt-spritesmith'); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment