[Enhancement] create post-run dependencies ("run after") and accept other irrelevant parameters (such as description)
OverZealous opened this issue · 6 comments
This is more for gulp, but it would be nice to be able to add short descriptions to tasks, so we could get a listing. For example, if add was called with two strings, the second string would be the description:
orchestrator.add('build-js', 'Builds and lints all JS', function(){...});
Then the description just needs to be included in the task object. Excluding task descriptions would allow us to filter out tasks that are not "top-level", too.
I'm torn. On the one hand, defining other metadata about a task that Orchestrator doesn't care about is probably easiest done here. On the other hand, Orchestrator really doesn't care about this metadata. Let me think on it.
My initial reaction is to overload orchestrator#add
like so:
orchestrator.add('task', ['complete','these','tasks','first'], function (cb) { /*do this/* });
and also
orchestrator.add('task', {
before: ['must','be','done','first'],
after: ['queue','after','this','task'],
other: 'things',
that: 'orchestrator',
ignores: 'but',
still: 'stores'
}, function () { /* do this */});
Yeah, I like overloading it like that. It becomes a "simple" merge of the passed in object data.
I haven't seen any updates to orchestrator, but are you still planning on making after
and before
non-dependent?
My need here is for tasks that are not automatically added to the build process, but if they are added in some fashion (via other dependencies, or manually included on the command line), they have to run in a specific fashion.
(I only ask because I see before
and after
, but no dependsOn
, so there's some ambiguity.)
I'm 1/2 way through rewriting orchestrator at the moment to solve #15, then I'll loop back to this.
This is now a feature of Orchestrator's develop branch. Give it a try and see if it's sufficient.
Implemented in https://github.com/orchestrator/orchestrator/tree/develop, track progress in gulpjs/gulp#347