WebStorm 11: Gulp plugin doesn't seem to support gulpfile.js directory?

I recently changed my Gulp structure to use a gulpfile.js directory, instead of a single file. This is a supported usecase in Gulp where Gulp simply loads the module by that name, not just a loose single file. Currently WebStorm does not seem to support this scenario for the Gulp plugin. When I changed to this structure, WebStorm stopped showing me the Gulp tasks list.

If there is a way to make this work, please let me know. Otherwise, I'd be curious if the WebStorm team could update the Gulp plugin to support this usecase? With complex Gulp workflows, it's a very nice way to keep things organized.

e: I'll put a feature request in the issue tracker as well, I just wanted to ask here to make sure there wasn't something I was missing that makes this work.

3 comments
Comment actions Permalink

Hmm... Not sure I understand what you are talking about. Indeed, a single gulpfile.js can be split into multiple files, but seems that the main gulpfile is still required? Please can you clarify what configuration you are using?

0
Comment actions Permalink

It's actually not required. You can actually just create a directory named 'gulpfile.js', and Gulp will happily load this as any other Node module (aka it needs an index.js in the directory). So you can have two styles of Gulp setup. A file named gulpfile.js at the root of your project, or a directory named gulpfile.js with an index.js (aka it's a valid Node directory module). Gulp will load both, but Webstorm only supports the former.

0
Comment actions Permalink

Please can you point me to the corresponding place in gulp docs?

0

Please sign in to leave a comment.