Gulp-util is now included in the npm gulp install?

ok, so I didn't find my answer in the questions already asked. I recently had to reload my node to enable trying to reload all globally loaded "things" (which I could remember).

Back when I was learning "Gulp" I remember that I need to make a separate install for gulp-util. But when I looked at the node> node_modules folder I can see where gulp-util was already loaded as an extra gulp module. It was also a duplicated and exact version of my separate gulp-util installation.

Thus, gulp (npm install -g gulp) now comes with gulp-util as part of the installation process. So making a separate install of gulp-util is pointless and overkill? Or do I still need to do this?

+3


source to share


1 answer


Yes, you still need it.

The fact that it gulp-util

is a submodule (along with any other) of gulp

means that it gulp

uses it, but does not mean that it does not need to be included.

If you want to get gulp-util

from gulp

, you can do something like this:



var gutil = require('gulp/node_modules/gulp-util')

      

But I strongly advise you not to.

Anyway, gulp

is a build tool, unnecessary question shouldn't be a concern since you are not shipping it or its raw submodules to the client.

+5


source







All Articles