forked from yang-wei/super-maria
-
Notifications
You must be signed in to change notification settings - Fork 0
/
gulpfile.js
35 lines (30 loc) · 872 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
var gulp = require('gulp'),
concat = require('gulp-concat'),
connect = require('gulp-connect');
gulp.task('connect', function() {
connect.server({
root: '.',
livereload: true
})
});
gulp.task('html', function() {
gulp.src('./app/*.html')
.pipe(connect.reload());
});
gulp.task('script', function() {
gulp.src([
'./app/scripts/commons/intro.js',
'./app/scripts/setting.js',
'./app/scripts/class/*.js',
'./app/scripts/app.js',
'./app/scripts/commons/outro.js'
])
.pipe(connect.reload())
.pipe(concat('all.js'))
.pipe(gulp.dest('.'));
});
gulp.task('watch', function() {
gulp.watch(['./app/*.html'], ['html']);
gulp.watch(['./app/scripts/app.js', './app/scripts/**/*.js'], ['script']);
});
gulp.task('default', ['script', 'connect', 'watch']);