-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathgulpfile.js
38 lines (31 loc) · 808 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
37
38
var gulp = require('gulp');
var p = require('gulp-load-plugins')();
var browserSync = require('browser-sync');
var reload = browserSync.reload;
// Start the server
gulp.task('browser-sync', function() {
browserSync({
open : true,
server: {
baseDir: "./"
}
});
});
gulp.task('slides',function () {
gulp.src('index.jade')
.pipe(p.plumber())
.pipe(p.jade())
.pipe(gulp.dest('./'))
.pipe(reload({stream:true}))
});
gulp.task('styles',function() {
gulp.src('./styles.styl')
.pipe(p.stylus())
.pipe(p.autoprefixer())
.pipe(gulp.dest('./'))
.pipe(reload({stream:true}))
});
gulp.task('default', ['slides','styles','browser-sync'] ,function() {
gulp.watch('./**/*.jade',['slides']);
gulp.watch('./**/*.styl',['styles']);
});