Answer the question
In order to leave comments, you need to log in
GULP not working, what's wrong?
var gulp = require('gulp');
var sass = require('gulp-sass');
var autoprefixer = require('gulp-autoprefixer');
var browserSync = require('browser-sync').create();
gulp.task('sass', function(){
return gulp.src('./src/sass/**/*.sass')
.pipe(sass().on('error', sass.logError))
.pipe(autoprefixer({
browsers: ['last 2 versions'],
cascade: false
}))
.pipe(gulp.dest('./src/css/'))
.pipe(browserSync.stream());
})
gulp.task('serve', ['sass'], function() {
browserSync.init({
server: "./src"
});
gulp.watch("src/sass/*.sass", ['sass']);
gulp.watch("src/*.html").on('change', browserSync.reload);
});
gulp.task('default', ['serve']);
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