Open myklemykle opened 7 years ago
@myklemykle This is a good start -- I've added some comments. Could we pull the function-as-prereq into a different PR that implements it across the board?
@myklemykle @mde I'm interested in using this feature myself - actually, I assumed the feature was included in Jake, and was scratching my head for a while when it didn't work.
What's the status of this MR? I would be willing to attack the remaining comments if needed - making "function-as-prereq" work in all cases might be a little too much work for me right now, but I can definitely take care of the other items.
With this change, the second argument to rule() can be an array of source file names. That makes rules more powerful, and more orthogonal to how fileTasks already specify their requirements.
This change also extends the functionality when the second argument is a function; that function may return such an array of sources, instead of just a single source. (This is particularly handy for my work, and also seems orthogonal to how rules & fileTasks work generally.)