var gulp = require('gulp'),
browserSync = require('browser-sync').create(),
less = require('gulp-less'),
sass = require('gulp-sass');
gulp.task('server', gulp.series('less'), function() {
browserSync.init({
server: {
baseDir: "./app/"
}
});
gulp.watch('./app/**/*.html').on('change', browserSync.reload);
gulp.watch('app/less/**/*.less', gulp.series('less'));
});
gulp.task('less', function(){
return gulp.src('./app/less/main.less')
.pipe(less())
.pipe(gulp.dest('./app/css'))
.pipe(browserSync.stream());
});
gulp.task('default', gulp.series('server'));
var gulp = require('gulp'),
browserSync = require('browser-sync').create(),
less = require('gulp-less'),
sass = require('gulp-sass');
gulp.task('server', function() {
browserSync.init({
server: {
baseDir: "./app/"
}
});
gulp.watch('./app/**/*.html').on('change', browserSync.reload);
gulp.watch('./app/**/*.css').on('change', browserSync.reload);
gulp.watch('app/less/**/*.less', ['less']);
});
gulp.task('less', function(){
return gulp.src('./app/less/main.less')
.pipe(less())
.pipe(gulp.dest('./app/css'));
});
// gulp.task('sass', function(){
// return gulp.src('./app/sass/main.scss')
// .pipe(sass())
// .pipe(gulp.dest('./app/css'));
// });
gulp.task('default', gulp.series('server'));
c:\Users\Bunny\Desktop\hotel>gulp
fs.js:27
const { Math, Object } = primordials;
^
ReferenceError: primordials is not defined
←[90m at fs.js:27:26←[39m
at req_ (c:\Users\Bunny\Desktop\hotel\node_modules\←[4mnatives←[24m\index.js:143:24)
at Object.req [as require] (c:\Users\Bunny\Desktop\hotel\node_modules\←[4mnatives←[24m\index.js:55:10)
at Object.<anonymous> (c:\Users\Bunny\Desktop\hotel\node_modules\←[4mvinyl-fs←[24m\node_modules\←[4mgraceful-fs←[24m\fs.js:1:37)
←[90m at Module._compile (internal/modules/cjs/loader.js:956:30)←[39m
←[90m at Object.Module._extensions..js (internal/modules/cjs/loader.js:973:10)←[39m
←[90m at Module.load (internal/modules/cjs/loader.js:812:32)←[39m
←[90m at Function.Module._load (internal/modules/cjs/loader.js:724:14)←[39m
←[90m at Module.require (internal/modules/cjs/loader.js:849:19)←[39m
←[90m at require (internal/modules/cjs/helpers.js:74:18)←[39m