gulp-task-loader icon indicating copy to clipboard operation
gulp-task-loader copied to clipboard

gulp v4.0.0

Open dipcore opened this issue 7 years ago • 2 comments

Does not work with gulp v4.0.0 ?

dipcore avatar Feb 01 '18 20:02 dipcore

@dipcore as it says in the readme, this is not actively maintained. But if you wanna supply a PR I'm happy to look at it.

hontas avatar Feb 01 '18 23:02 hontas

Yeah, [email protected] changed how to define tasks. Strange thing is that it says the API is still available:

In the past, task() was used to register your functions as tasks. While that API is still available, exporting should be the primary registration mechanism, except in edge cases where exports won't work.

But tasks aren't loading on my project. Maybe they changed how to invoke it. Looks like the have their own way of splitting files now.


EDIT:

I just converted one of my existing projects to gulp 4. (Had to remove gulp-task-loader, though) Didn't have a lot of trouble, although needed a bit more code than using the previous version together with gulp-task-loader.

From what I understood they are trying to move away from referencing tasks by a string name and use functions (even though the string api seems to still be there).


EDIT 2:

I just remembered that during refactor I was having trouble with a task that didn't return anything until I learned that you need to receive a callback and call it on functions that don't return anything.

Maybe converting "void" functions to receive a callback and calling it before the function ends make this project work with gulp v4, didn't test it though.

masterl avatar Dec 16 '18 03:12 masterl