0

I'm looking for best way to divide my Gruntfile.js where grunt tasks are defined.

Right now I have made it with require and look like this:

require('./grunt_tasks/task_1')(grunt);

And task_1.js looks like:

module.exports = function(grunt){
    grunt.registerTask('task_1', [
        'sub_task_1',
        'sub_task_2',
        'sub_task_3'
    ]);
};

It work nice, but I'm looking for a cleaner way. Thanks.

Rob
  • 14,746
  • 28
  • 47
  • 65
Cespejo
  • 414
  • 2
  • 11
  • Hey man. Here is what you are looking for : http://stackoverflow.com/questions/33804659/how-to-create-and-organise-config-and-register-grunt-tasks – Louis Barranqueiro Mar 02 '16 at 21:05

1 Answers1

0

I found this, load-grunt-config and in config add configPath array for load files.

Cespejo
  • 414
  • 2
  • 11