cowboy/grunt — pull request #80 by kmiyashiro (2012-03-27 18:11:38+00:00)
Title: Fix 'target' -> 'this.target' in all instances of multiTask docs

The following is wrong, AFAIK. `target` is never passed in the arguments, you must access it via `this.target`. I might be wrong, but I tried explicitly targeting and just running all targets and `this.target` was the only thing that worked for me.

```js
/*global config:true, task:true*/
config.init({
logstuff: {
foo: [1, 2, 3],
bar: 'hello world',
baz: false
}
});

task.registerMultiTask('logstuff', 'This task logs stuff.', function(target) {
// target === the name of the target
// this.data === the target's value in the config object
// this.name === the task name
// this.args === an array of args specified after the target on the command-line
// this.flags === a map of flags specified after the target on the command-line
// this.file === file-specific .src and .dest properties

// Log some stuff.
log.writeln(target + ': ' + this.data);

// If data was falsy, abort!!
if (!this.data) { return false; }
log.writeln('Logging stuff succeeded.');
});
```

Fixed:

task.registerMultiTask('logstuff', 'This task logs stuff.', function() {
// this.target === the name of the target
// this.data === the target's value in the config object
// this.name === the task name
// this.args === an array of args specified after the target on the command-line
// this.flags === a map of flags specified after the target on the command-line
// this.file === file-specific .src and .dest properties

// Log some stuff.
log.writeln(target + ': ' + this.data);

// If data was falsy, abort!!
if (!this.data) { return false; }
log.writeln('Logging stuff succeeded.');
});
```