-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathgulpfile.js
executable file
·47 lines (42 loc) · 1.15 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
44
45
46
47
var gulp = require('gulp'),
jade = require('gulp-jade'),
stylus = require('gulp-stylus'),
watch = require('gulp-watch');
var browserSync = require('browser-sync').create();
var config = {
stylus: "./src/styles/*.styl",
jade:'./src/*.jade',
html: "./*.html",
//video: "./*.mp4",
dist: "./"
};
// gulp.task('video', function() {
// return gulp.src(config.video)
// .pipe(gulp.dest(config.dist))
// .pipe(browserSync.stream());
// });
gulp.task('jade', function() {
return gulp.src(config.jade)
.pipe(jade({
pretty: true
}))
.pipe(gulp.dest(config.dist))
.pipe(browserSync.stream());
});
gulp.task('stylus', function () {
return gulp.src(config.stylus)
.pipe(stylus())
.pipe(gulp.dest(config.dist))
.pipe(browserSync.stream());
});
gulp.task('default', function() {
browserSync.init({
server: {
baseDir: config.dist
}
});
gulp.watch(config.jade, gulp.series('jade'));
gulp.watch(config.stylus, gulp.series('stylus'));
gulp.watch(config.html).on('change', browserSync.reload);
//gulp.watch(config.video, gulp.series('video'));
});