Skip to content

Instantly share code, notes, and snippets.

@NickHeiner
Created January 15, 2014 21:32
Show Gist options
  • Select an option

  • Save NickHeiner/8445118 to your computer and use it in GitHub Desktop.

Select an option

Save NickHeiner/8445118 to your computer and use it in GitHub Desktop.
module.exports = function(grunt) {
grunt.initConfig({
foo: {
options: {
bar: {
minify: true,
scripts: ['a', 'b', 'c']
}
},
target: {
options: {
bar: {
minify: false
}
}
}
}
})
grunt.registerMultiTask('foo', function() {
console.log('foo');
console.log(JSON.stringify(this.options(), null, 2));
})
};
/**
This outputs:
$ g foo:target
Running "foo:target" (foo) task
foo
{
"bar": {
"minify": false
}
}
Done, without errors.
but I would hope that it outputs:
$ g foo:target
Running "foo:target" (foo) task
foo
{
"bar": {
"minify": false,
"scripts": ["a", "b", "c"]
}
}
Done, without errors.
*/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment