Answer the question
In order to leave comments, you need to log in
What is the principle of calling functions from a project?
When I write gulp task in the console
, my node starts looking in the modules for something called gulp, and then, if it finds it, it follows its instructions and looks for the gulpfile.js file and is it already looking for the task function in it?
I just call it all without node, but immediately with gulp
And what is it for?
"main": "gulp.js"
I don't have a file with that name.
Answer the question
In order to leave comments, you need to log in
tasks are described in gulpfile.js. depending on the directory in which you call the gulp command, this file will be searched. if the command was launched without arguments, only gulp, then default tasks will be executed
to launch a specific task, it must be described, for examplegulp.task('default', ['watch']);
gulp.task('watch', ['sass', 'js', 'browser-sync'], function() {
gulp.watch('app/sass/**/*.sass', ['sass']);
gulp.watch(['libs/**/*.js', 'app/js/common.js'], ['js']);
gulp.watch('app/*.html', browserSync.reload);
});
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question