-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathgulpfile.js
More file actions
35 lines (29 loc) · 783 Bytes
/
gulpfile.js
File metadata and controls
35 lines (29 loc) · 783 Bytes
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
var gulp = require('gulp');
var pug = require('gulp-pug');
var stylus = require('gulp-stylus');
var connect = require('gulp-connect');
gulp.task('pug', function () {
gulp.src('./src/*.pug')
.pipe(pug())
.pipe(gulp.dest('./out'))
.pipe(connect.reload());
});
gulp.task('stylus', function () {
gulp.src('./src/assets/styles/*.styl')
.pipe(stylus())
.pipe(gulp.dest('./out/assets/styles'))
.pipe(connect.reload());
});
gulp.task('watch', function () {
gulp.watch(['./src/*.pug'], ['pug']);
gulp.watch(['./src/assets/styles/*.styl'], ['stylus']);
});
gulp.task('serve', function () {
connect.server({
root: './out',
livereload: true,
port: 3210
});
});
gulp.task('build', ['pug', 'stylus']);
gulp.task('server', ['serve', 'watch']);