Answer the question
In order to leave comments, you need to log in
Gulp watch: how to run in terminal?
Hello. Tell me what command to run gulp watch in the terminal (when driving in gulp watch, it writes an error)?
Here is the content of gulpfile.js
const gulp = require('gulp');
const sass = require('gulp-sass')(require('sass'));
const sourcemaps = require('gulp-sourcemaps');
const watch = require('gulp-watch');
function buildStyles() {
return gulp.src('./scss/**/*.scss')
.pipe(sourcemaps.init())
.pipe(sass().on('error', sass.logError))
.pipe(sourcemaps.write('./'))
.pipe(gulp.dest('./css'));
};
exports.buildStyles = buildStyles;
exports.watch = function () {
gulp.watch('./scss/**/*.scss', ['scss']);
};
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question