-
Notifications
You must be signed in to change notification settings - Fork 0
/
gulpfile.js
38 lines (34 loc) · 1.28 KB
/
gulpfile.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
var gulp = require('gulp');
var browserSync = require('browser-sync');
var reload = browserSync.reload;
var sass = require('gulp-sass');
var concat = require('gulp-concat');
var minifyCSS = require('gulp-minify-css');
var autoprefixer = require('gulp-autoprefixer');
var rename = require('gulp-rename');
// browser-sync task for starting the server.
gulp.task('browser-sync', function() {
//watch files
var files = [
'web/wp-content/themes/berrydesigntheme/style.css',
'web/wp-content/themes/berrydesigntheme/*.php'
];
//initialize browsersync
browserSync.init(files, {
//browsersync with a php server
proxy: "berrywebdesign.localhost.com",
notify: false
});
});
// Sass task, will run when any SCSS files change & BrowserSync
// will auto-update browsers
gulp.task('sass', function () {
return gulp.src('web/wp-content/themes/berrydesigntheme/styles/scss/style.scss')
.pipe(sass())
.pipe(gulp.dest('web/wp-content/themes/berrydesigntheme/'))
.pipe(reload({stream:true}));
});
// Default task to be run with `gulp`
gulp.task('default', ['sass', 'browser-sync'], function () {
gulp.watch("web/wp-content/themes/berrydesigntheme/styles/scss/*.scss", ['sass']);
});