At the end of the
Gulpfile.js file we'll write down some tasks, including the default task, which runs a sequence of tasks of the build process. These tasks may look like the following:
gulp.task('set-development', development.task); gulp.task('set-production', production.task); gulp.task('test',['scss-lint','validate-html']); gulp.task('build', ['clean','copy','compile-js','compile-sass','compile-html']); gulp.task('default', ['set-development','server', 'watch']); gulp.task('deploy', ['set-production','server', 'watch']);
The default task sets the environment to development by calling the
set-development task first. Then it runs the
server task, and starts the watch task after that. Because ...