gulpjs / undertaker

Task registry that allows composition through series/parallel methods.
MIT License
200 stars 31 forks source link

Added handling of multiple tasks referring to the same JS function #34

Closed daizenberg closed 9 years ago

daizenberg commented 9 years ago

A proposed resolution to issue https://github.com/gulpjs/gulp/issues/1159

phated commented 9 years ago

I like this a lot. Not a lot of code and solves the problem we are running into. However, I think this breaks the gulp --tasks command line option because we pass the results of .tree() directly to the archy module and I don't think it accepts an array as a label

phated commented 9 years ago

@daizenberg thoughts?

Whoaa512 commented 9 years ago

Regarding the broken --tasks, couldn't we simply add the follow snippet, or something similar, here

if(_.isArray(meta.tree.label))
  return '[' + meta.tree.label.toString() + ']';
else
  return meta.tree.label;
phated commented 9 years ago

Fixed by #50. Thanks for submitting this implementation. It got us thinking about the best way to solve.