nicosantangelo / sublime-gulp

Run Gulp tasks and use snippets from Sublime Text
https://sublime-gulp.nicosantangelo.com/
MIT License
155 stars 18 forks source link

Switch to Gulp 4 broke the Command Palette availability #59

Closed jay-zahiri closed 8 years ago

jay-zahiri commented 8 years ago

Hi, When I switched to Gulp 4 I could no longer use the Command Palette to access the commands. When I chose Gulp in the palette I got this error in the log:

/Library/Application Support/Sublime Text 3/Packages/Gulp/write_tasks_to_cache.js:64
    gulp.tree({ deep: true }).forEach(function(task) {
                              ^

TypeError: gulp.tree(...).forEach is not a function
    at _forEachTask4x (/Library/Application Support/Sublime Text 3/Packages/Gulp/write_tasks_to_cache.js:64:31)
    at forEachTask (/Library/Application Support/Sublime Text 3/Packages/Gulp/write_tasks_to_cache.js:50:9)
    at Object.<anonymous> (/Library/Application Support/Sublime Text 3/Packages/Gulp/write_tasks_to_cache.js:88:5)
    at Module._compile (module.js:398:26)
    at Object.Module._extensions..js (module.js:405:10)
    at Module.load (module.js:344:32)
    at Function.Module._load (module.js:301:12)
    at Function.Module.runMain (module.js:430:10)
    at startup (node.js:141:18)
    at node.js:980:3

Is the plugin suppose to be compatible with Gulp 4?

nicosantangelo commented 8 years ago

It should be compatible and that's a bug! I'm going to upgrade a local project and give it a try.

In the meantime, the log is pointing to a line that does not exist in this package alert(gulp.tree({ deep: true })); on Line 63 of write_tasks_to_cache.js

If so (or, just in case), some ideas:

Thanks a lot for the report I'll let you know how it goes

jay-zahiri commented 8 years ago

Oh yeah, sorry about that. It was just me trying to debug the problem. I've updated the initial message.

nicosantangelo commented 8 years ago

Perfect, I'll give it a try as soon as I can (it seems the API changed)

jay-zahiri commented 8 years ago

Cool and thanks for the great work! In the meantime I'll use the terminal =)

nicosantangelo commented 8 years ago

@jay-zahiri Status update

The gulp API changed in the last few commits. I fixed it locally but I want to test it out a bit more, I'll try to make a release with the fix by Thursday

nicosantangelo commented 8 years ago

@jay-zahiri The patch should be up (on v5.2.3) it may take a while to update if you're using Package Control.

I'll close this issue but if the error persist please let me know