-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathgulpfile.js
More file actions
42 lines (36 loc) · 918 Bytes
/
gulpfile.js
File metadata and controls
42 lines (36 loc) · 918 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
36
37
38
39
40
41
42
var gulp = require('gulp'),
connect = require('gulp-connect'),
jade = require('gulp-jade'),
stylus = require('gulp-stylus'),
uglify = require('gulp-uglify');
gulp.task('connect', function () {
connect.server({
port: 1337,
livereload: true,
root: './dist'
});
});
gulp.task('jade', function () {
gulp.src('jade/*.jade')
.pipe(jade())
.pipe(gulp.dest('dist'))
.pipe(connect.reload());
});
gulp.task('stylus', function () {
gulp.src('stylus/*.styl')
.pipe(stylus({set: ['compress']}))
.pipe(gulp.dest('dist/css'))
.pipe(connect.reload());
});
gulp.task('js', function () {
gulp.src('js/*.js')
.pipe(uglify())
.pipe(gulp.dest('dist/js'))
.pipe(connect.reload());
});
gulp.task('watch', function () {
gulp.watch('jade/*.jade', ['jade']);
gulp.watch('stylus/*.styl', ['stylus']);
gulp.watch('js/*.js', ['js']);
});
gulp.task('default', ['jade', 'stylus', 'js', 'connect', 'watch']);