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

Ability to define descriptions in aliases file #39

Closed pflannery closed 10 years ago

pflannery commented 10 years ago

Would be nice to have the ability to put descriptions with the aliases declared in the aliases file.

Perhaps we can change this segment to something like this:

  if (aliases) {
    for (var taskName in aliases) {
        var task = aliases[taskName];
        if (typeof task === 'string' || Array.isArray(task))
            grunt.registerTask(taskName, aliases[taskName]);
        else {
            grunt.registerTask(taskName, task.description, task.aliases);
        }
    }
  }

that way aliases can be like this:

{
    //================
    "default": [ 
        "compile"
    ],
    //================
    "compile": { 
        description: "some description",
        tasks: [
            "shell:someCompile"
        ]
    },
    //================
    "watch": [ 
        "shell:someWatch"
    ]
}
defaude commented 10 years ago

+1

jgallen23 commented 10 years ago

good idea. I'll add this to the list.

htanjo commented 10 years ago

+1

morficus commented 10 years ago

+1