How to use Gulp for small projects?

The question about the use of classical tasks like concatenation, minification, etc. I Have configured the config gulp.js and package.json.

Question: need to install all packages in a folder with a new project, all modules if the project is considered to be very easy and short-term?
Ie do I need to bother with installing all these plugins (and take up disk space). Or you can create some working folder (let's call it "Workshop"), which sometimes throw *.css and *.js for quick compilation, and don't configure anything from scratch. And after compile to empty the folder and leave it for the new "fast" tasks.
July 2nd 19 at 18:15
4 answers
July 2nd 19 at 18:17
No, all modules can be installed globally using the-g flag. For example: "npm install gulp-sass-g"
And then Kalinkovichi module in the project folder thus: "npm link gulp-sass".
Thus you will have a node_modules folder with links to globally installed packages.
July 2nd 19 at 18:19
I just created one gulp folder for freelancing in gulpfile indicate the name of the active project and the whole Assembly is only for him, still don't understand why every time to set the same to perform similar tasks.
you can throw an example config? Thank you - Candida93 commented on July 2nd 19 at 18:22
: The time will post on github, here is a simple example, create a folder "projects", and run tasks for a specific project:
process.env.ACTIVE_PROJECT = 'myproj';

var pathScripts = __dirname + '/projects/' + process.env.ACTIVE_PROJECT + '/scripts/*.js';

gulp.task('taskName', function() {
 return gulp.src(pathScripts).pipe(uglify()).pipe(gulp.dest('dest'));
});
- Laura_Pacocha commented on July 2nd 19 at 18:25
July 2nd 19 at 18:21
Yes, you need.
The second option is to arrange a sandbox for projects with a minimal set of plugins, just where will be stripped files of old projects.
July 2nd 19 at 18:23
As a variant to collect. bat/sh script runs gulp in the current working directory.
Itself config modules may lie anywhere, the main thing to use in the config paths relative to the current working directory.

The script to register in the %PATH% so that it is available in any directory.

Find more questions by tags Gulp.js