lastRun takes a function, not a string#1828
Conversation
|
Gulp docs say it's a string: https://github.com/gulpjs/gulp/blob/4.0/docs/API.md#gulplastruntaskname-timeresolution Undertaker docs say it's either a string or a function: https://www.npmjs.com/package/undertaker#lastruntask-timeresolution Is this patch as a result of something breaking or from reading docs? (I actually prefer the function syntax. Just wondering) |
|
It was failing when I used a string - maybe that's a bug. |
|
The error is |
|
I believe it tries to look up the task function by string and checks last-run of the function. That assertion might be due to a failed lookup of the string. I'm on mobile currently and can't dig into the code. |
|
Just tested the example and it works. However, because it is a snippet, it doesn't portray that the @jakearchibald would you like to change this PR to include the task registration portion? I think that would make more sense to new users. |
|
I don't have strong feelings, but With With |
|
I'm fine with that change too. |
|
If you're happy with |
|
Thanks! 😃 |
I guess that's why it wasn't merged! May have merged this prematurely - my mistake. 😳 I'll add the task registration to the README now. |
|
The task registration portion isn't needed if you're providing a function to |
This reverts commit 078d891.
|
Right, makes sense now. Whoops! |
No description provided.