Gulp Task Runner | Multiple Gulp Packages and gulpfiles

I have a PHPStorm project that contains lots of separate but related packages. This is convenient because I work on all of the related packages without having to open a different project for each one; particularly helpful as these packages are quite small and I tend to flit between them. However, the Gulp task runner is not playing nice.

Each package has a local Gulp install that needs to be used with the corresponding gulpfile. Whenever I change the Gulp package location for one gulpfile, it automatically changes the Gulp package location for all of them. It seems to assume that there is only one node_modules folder per PHPStorm project.

Is there any way for me to get the Gulp Task runner to work with separate Gulp Package locations for each gulpfile? Or will I just have to go back to the CLI?

0
4 comments

Hi there,

AFAIK it's expected behaviour for PhpStorm/WebStorm as it's not made for such (rather complex) setups. Right now it supports only one PHP Language Level for whole project; one JavaScript variety for whole project; one specific linter version...

Check for example this ticket and comments: https://youtrack.jetbrains.com/issue/WEB-24941

Maybe devs will have something better to say. Cannot give any better advise myself (I do not have lot of experience with Gulp/Grunt -- I just have one such file per project and it works perfectly fine for my needs) .. but consider creating Feature Request ticket at the Issue Tracker -- https://youtrack.jetbrains.com/issues/WI

1

Thanks for the reply.

I agree it seems like expected behaviour. In fact, for applications and larger projects I agree that 1-1 correspondence between the project and the repository is best. But I maintain a large set of supporting packages that are shared between my apps; these packages are highly modular to help promote versatility and code reuse. So if I need to make some changes to the API of a package, then I have to modify all of the interconnecting packages as well. Constantly moving between a half-dozen related packages is not great so I have recently switched to using a single PHPStorm project for the each grouping of packages.

I don't think I will raise a feature request: this is probably a fairly small use-case and I can use command line tools to replace features that don't work well with multiple project roots.

Thanks again.

0

Well .. micro-service architecture getting more popular these days (at lest the hype is still around; maybe not so much as it was 0.5-1 year ago) .. which is also the valid case for few rather small (and partially related) projects... But you may be correct -- having different Gulp setups may not be the wide case.

In any case: you will be interested in https://youtrack.jetbrains.com/issue/WEB-7968 ticket -- proper multiple projects in single window.

This ticket has no estimates at all on when it can be implemented .. so you should not hold your breath for this any time soon. But eventually it may get done (in one form or another). Sad thing -- the IntelliJ IDE itself does not support this (only multi-modules; PhpStorm/WebStorm consists of one module only)...

1

problem with having multiple Gulp packages is tracked as https://youtrack.jetbrains.com/issue/WEB-21231, please follow it for updates

0

Please sign in to leave a comment.