-
Notifications
You must be signed in to change notification settings - Fork 169
/
Copy pathgulpfile.js
43 lines (33 loc) · 1.09 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
39
40
41
42
43
'use strict';
var gulp = require('gulp'),
browserSync = require('browser-sync'),
reload = browserSync.reload;
var sass = require('gulp-sass');
gulp.task('sass', function () {
gulp.src('scss/**/*.scss')
.pipe(sass().on('error', sass.logError))
.pipe(gulp.dest('css'));
});
gulp.task('sass:watch', function () {
gulp.watch('scss/*.scss', ['sass']);
gulp.watch(['css/*.css'], reload);
});
// Start a server with Live Reload
gulp.task('serve', ['sass'], function () {
browserSync({
// notify: false,
// Customize the BrowserSync console logging prefix
// logPrefix: 'WSK',
// Run as an https by uncommenting 'https: true'
// Note: this uses an unsigned certificate which on first access
// will present a certificate warning in the browser.
// https: true,
server: ['.tmp', './']
// proxy: 'http://localhost:8888/'
});
gulp.watch(['./scss/**/*.scss'], ['sass']);
gulp.watch(['css/**/*.css'], reload);
gulp.watch(['./*.html'], reload);
// gulp.watch(['./*.php'], reload);
// gulp.watch(['js/**/*.js'], [reload]);
});