const gulp = require('gulp'), sass = require('gulp-sass')(require('sass')), browserSync = require('browser-sync').create(); function mixin() { return gulp.src('./css/*.scss') .pipe(sass().on('error',sass.logError)) .pipe(gulp.dest('./css/')) .pipe(browserSync.stream()); } function run() { browserSync.init({ server: { baseDir: "./", index: "/index.html" } }); gulp.watch('./css/*.scss', mixin); gulp.watch([ './*.html', './css/**/*.css', './js/**/*.js' ]).on('change',browserSync.reload); console.log("🔥 Run"); } exports.mixin = mixin; exports.run = run;