Enable access to the default options of a task in the configurations of another task
- Dominant language
- JavaScript
- Stars
- 12.2k
- Forks
- 1.5k
- PR merge metrics
- No merged PRs in 30d
Description
I did not find any explicit documentation regarding this.
Doesn't it makes sense to be able to access the merged defaults from another task configuration?
Use case:
``` javascript
servers: {
wildfly: {
options: {
// This value is assumed default, not specified
// preset: "wildfly-8.1.0.Final"
}
}
},
qunit: {
wildfly: {
options: {
urls: [
// In this case it doesn't work, because "servers.wildfly.options.preset" is not available
"http://localhost/<%= servers.wildfly.options.preset %>/index.html"
]
}
}
}
```
In my task I am using the following code:
``` javascript
var defaults = {
preset: "wildfly-8.1.0.Final"
};
grunt.registerMultiTask( "servers", function() {
var options = this.options( defaults );
// ... task behavior here
});
```
It is expected that "preset" is available outside the task into the developer's configuration, but it currently doesn't.
Contributor guide
Assessment
This issue has not been assessed yet.