Skip to content

Instantly share code, notes, and snippets.

@kazu69
Created February 24, 2014 16:09
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kazu69/9191244 to your computer and use it in GitHub Desktop.
Save kazu69/9191244 to your computer and use it in GitHub Desktop.
default:
- 'css_sprite'
module.exports = ->
sprite:
options:
style: 'css/sprite.css'
orientation: 'vertical'
margin: 5
cssPath: '../images'
processor: 'css'
src: ['src/images/*']
dest: 'images/sprite.png'
base64:
options:
style: 'scss/sprite.scss'
orientation: 'horizontal'
margin: 5
cssPath: '../images'
processor: 'scss'
base64: true
watch: true
src: ['src/images/*']
dest: 'images/sprite-horizontal.png'
###
css-sprite
https://github.com/kazu69/css-sprite
Copyright (c) 2014 kazu69
Licensed under the MIT license.
###
module.exports = (grunt) ->
'use strict'
path = require('path')
# load all grunt tasks matching the `grunt-*` pattern
require('load-grunt-config') grunt,
configPath: path.join(process.cwd(), 'gruntTasks')
init: true
config:
test: false
loadGruntTasks:
config: require('./package.json')
scope: [
'devDependencies'
'dependencies'
]
pattern: ['grunt-*', 'css-sprite']
brew install cairo
npm install -save-dev css-sprite
grunt
{
"name": "css-sprite",
"description": "The best project ever.",
"version": "0.1.0",
"homepage": "https://github.com/kazu69/css-sprite",
"repository": {
"type": "git",
"url": "git://github.com/kazu69/css-sprite.git"
},
"bugs": {
"url": "https://github.com/kazu69/css-sprite/issues"
},
"licenses": [
{
"type": "MIT",
"url": "https://github.com/kazu69/css-sprite/blob/master/LICENSE-MIT"
}
],
"main": "index.js",
"engines": {
"node": ">= 0.10.0"
},
"devDependencies": {
"grunt": "~0.4.2",
"grunt-notify": "~0.2.17",
"load-grunt-config": "~0.7.1",
"time-grunt": "~0.2.9",
"grunt-newer": "~0.6.1",
"css-sprite": "~0.6.2"
},
"keywords": []
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment