-
Notifications
You must be signed in to change notification settings - Fork 48
Description
We are using many grunt tasks, in many different ways. Many of these tasks are distracting for developers trying to see their core available options. As far as I can tell there is no way to take over grunt -h, but we can use grunt-available-tasks to create an alternate help listing for our key operations. I have tested this out on a project and it works well.
- This plugin wants to operate top-down. Our system tries to be flexible, unlike a specific project, so we need to preprocess it's configuration to source it bottom up (see proposal below).
- Consider how we get some custom documentation (to emphasize specific flags) in addition to a list of tasks.
- Rename available-tasks to something simpler, such as
tasksorhelp(usinggrunt.task.renameTask())
Bottom-up Configuration
As mentioned above, one of the weaknesses of this plugin for our purposes is it's top-down configuration. However, we can take care of that by having our own configuration structure, something like:
task: {
target: {
display: true
description: "A substitute description",
group: "Drupal Utilities"
}
}This configuration can be set by individual project Gruntconfig.json files, but more importantly we can use grunt.config.set() in each individual task to setup it's participation in the task listing. By default we can leave the task hidden.