Created
May 17, 2018 23:43
-
-
Save RuNpiXelruN/1bb00535bbd65e9567ea589c4c73c096 to your computer and use it in GitHub Desktop.
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
var gulp = require('gulp'), | |
sass = require('gulp-sass'), | |
concat = require('gulp-concat'), | |
browserSync = require('browser-sync').create(); | |
gulp.task('serve', ['sass'], function() { | |
browserSync.init({ | |
proxy: "http://daf.test" | |
}); | |
gulp.watch("./wp-content/themes/twentyseventeen-child/scss/**/*.scss", ['sass']); | |
gulp.watch('./wp-content/themes/twentyseventeen-child/**/*.php').on('change', browserSync.reload); | |
// gulp.watch("app/*.html").on('change', browserSync.reload); | |
}); | |
// Compile sass into CSS & auto-inject into browsers | |
gulp.task('sass', function() { | |
return gulp.src("./wp-content/themes/twentyseventeen-child/scss/index.scss") | |
.pipe(sass({ | |
'outputStyle': 'compressed' | |
})) | |
.pipe(concat('style.css')) | |
.pipe(gulp.dest('./wp-content/themes/twentyseventeen-child/')) | |
.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