Created
November 30, 2017 09:56
-
-
Save sousatg/9cb8b9c15d27b83ef96905b9bb880a55 to your computer and use it in GitHub Desktop.
Gulp wordpress development configuration
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const gulp = require('gulp'); | |
const browserSync = require('browser-sync').create(); | |
const sass = require('gulp-sass'); | |
gulp.task('serve', ['sass'], function() { | |
browserSync.init({ | |
proxy: 'mood.dev' | |
}); | |
gulp.watch('sass/**/*.scss', ['sass']); | |
gulp.watch('**/*.php').on('change', browserSync.reload); | |
}); | |
gulp.task('sass', function() { | |
return gulp.src('sass/style.scss') | |
.pipe(sass()) | |
.pipe(gulp.dest('assets/css')) | |
.pipe(browserSync.stream()); | |
}); | |
gulp.task('default', ['serve']); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment