0

I'm using a package.son where I list all the Gulp NPM modules. In that file I have "gulp": "3.8.11",

I would like to use Gulp4 and I read here some different ways to access it:

   http://stackoverflow.com/questions/33429727/how-do-i-install-gulp-4

But is it possible to also do this with a package.json? When I try to look at versions of "gulp" the auto part of Visual Studio doesn't prompt me for anything more than a 3.9 version.

Also is there a way that I could have some tasks use Gulp3 and others uses Gulp4?

Alan2
  • 23,493
  • 79
  • 256
  • 450
  • Why the vote to close this question? – Alan2 Apr 18 '16 at 16:23
  • Why would you want some tasks to use gulp3? – SteveLacy Apr 18 '16 at 17:36
  • @SteveLacy - I though that changes were needed to the tasks to run with Gulp4 so while moving from 3 to 4 then I was thinking it would be a good idea to be able to use both at once. –  Apr 19 '16 at 03:21

2 Answers2

1

Duplicate, but regardless:

npm install gulpjs/gulp#4.0 --save-dev

That adds this to the package.json:

"gulp": "gulpjs/gulp#4.0"
SteveLacy
  • 4,150
  • 2
  • 23
  • 30
1

Here is the only solution that I could get to work:

"gulp-4.0.build": "4.0.0-build.a271520",

Note that the version details on the right were added automatically by Visual Studio.

Samantha J T Star
  • 30,952
  • 84
  • 245
  • 427