selaux/node-sprite-generator — pull request #32 by scott-kennedy (2014-12-31 17:09:52+00:00)
Title: allow global task options in gruntfile

This commit allows global options in a gruntfile and merges them with the existing options for each task. It reduces the amount of duplication needed in the gruntfile when you have multiple tasks that all use the same base options.

### Ex gruntfile before:
```
spriteGenerator: {
taskOne: {
compositor: 'gm',
compositorOptions: {
compressionLevel: 9
},
layout: 'diagonal',
src: [
'<%= dirs.root %>/images/icons/*.png'
],
spritePath: '<%= dirs.root %>/images/sprite.png',
stylesheetPath: '<%= dirs.css %>_sprites.scss',
stylesheet: 'scss',
stylesheetOptions: {
pixelRatio: 2
}
},
taskTwo: {
compositor: 'gm',
compositorOptions: {
compressionLevel: 9
},
layout: 'diagonal',
src: [
'<%= dirs.root %>/images/icons/blue/*.png'

],
spritePath: '<%= dirs.root %>/images/sprite.png',
stylesheetPath: '<%= dirs.css %>_sprites.scss',
stylesheet: 'scss',
stylesheetOptions: {
pixelRatio: 2
}
}
}
```

### Ex grunfile after:
```
spriteGenerator: {
options: {
compositor: 'gm',
compositorOptions: {
compressionLevel: 9
},
layout: 'diagonal',
stylesheet: 'scss',
stylesheetOptions: {
pixelRatio: 2
},
spritePath: '<%= dirs.root %>/images/sprite.png',
stylesheetPath: '<%= dirs.css %>_sprites.scss'
},
taskOne: {
src: [
'<%= dirs.root %>/images/icons/*.png'
]
},
taskTwo: {
src: [
'<%= dirs.root %>/images/icons/blue/*.png'
]
}
}
```