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

aliases file can now contain functions that need access grunt object #51

Closed greghopkins closed 10 years ago

greghopkins commented 10 years ago

I duplicated a bit of your logic to enable the aliases file to contain function definitions that need access to the grunt object.

As an example,

module.exports = {
  'default': function (grunt) {
    grunt.log.error('This task has been disabled!');
  },
  task1: [
    'thingOne',
    'thingTwo'
  ]
};

Due to the simplicity of the change, I did not add a test. You currently have aliases.yml, so I didn't want to remove and/or mess with it. With this change, your tests still succeed.

jgallen23 commented 10 years ago

thanks @greghopkins but this was addressed in the latest beta. You'll be able to do:

module.exports = function(grunt) {
  return {
    default: ['task1']
  }
}

Let me know if the beta works for you. I'm planning on releasing it soon.

greghopkins commented 10 years ago

I should have looked a bit closer. That solves my issue. Keep up the good work!