firstandthird / load-grunt-config

Grunt plugin that lets you break up your Gruntfile config by task
firstandthird.github.io/load-grunt-config/
MIT License
374 stars 64 forks source link

Pass grunt reference to function options #8

Closed sebdeckers closed 11 years ago

sebdeckers commented 11 years ago

Some of my options use a reference to grunt to do more complex stuff than simple JSON allows.

This patch is backwards compatible and supports both of these syntax for options files:

Function

module.exports = function (grunt) {
    return { /* ... */ };
};

JSON

module.exports = { /* ... */ };
jgallen23 commented 11 years ago

can you add some tests?

sebdeckers commented 11 years ago

Test added

jgallen23 commented 11 years ago

awesome, thanks. I'll merge and release this tonight