Answer the question
In order to leave comments, you need to log in
How to connect the PUG compiler?
there is gulpfile.js, please help me connect pug
var gulp = require('gulp'),
sass = require('gulp-sass'),
browserSync = require('browser-sync'),
autoprefixer = require('gulp-autoprefixer');
gulp.task('sass', function(){
return gulp.src(['app/sass/**/*.sass', 'app/sass/**/*.scss'])
.pipe(sass({outputStyle: 'expanded'}).on('error', sass.logError))
.pipe(autoprefixer(['last 16 versions', '> 1%', 'ie 8', 'ie 7'], { cascade: true }))
.pipe(gulp.dest('app/css'))
.pipe(browserSync.reload({stream: true}))
});
gulp.task('browser-sync', function() {
browserSync({
proxy: "localhost:8888",
notify: false
});
});
gulp.task('watch', ['browser-sync', 'sass'], function() {
gulp.watch(['app/sass/**/*.sass', 'app/sass/**/*.scss'], ['sass']);
gulp.watch("**/*.html", browserSync.reload);
gulp.watch("app/js/*.js", browserSync.reload);
});
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