-
Notifications
You must be signed in to change notification settings - Fork 0
/
gulpfile.js
36 lines (31 loc) · 953 Bytes
/
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
var gulp = require('gulp');
var compass = require('gulp-compass');
var browserSync = require('browser-sync');
gulp.task('compass-task', () => {
gulp.src(['compass/source/*.scss', 'compass/source/*/*.scss'])
.pipe(compass({
config_file: './compass/config.rb',
css: 'public/css',
sass: 'compass/source',
style: 'compact',
comments: false
}))
.pipe(gulp.dest('public/css'))
.pipe(browserSync.stream());
});
gulp.task('browser-reload', function () {
browserSync.reload();
});
gulp.task('watch', () => {
gulp.watch(['compass/source/*.scss', 'compass/source/*/*.scss'], ['compass-task']);
gulp.watch('public/js/**/*.js', ['browser-reload']);
gulp.watch('*.html', ['browser-reload']);
gulp.watch('*.php', ['browser-reload']);
gulp.watch('*/*.php', ['browser-reload']);
});
gulp.task('browser-sync', () => {
browserSync.init({
proxy: "http://127.0.0.1:8000/"
});
});
gulp.task('default', ['compass-task', 'watch', 'browser-sync']);