-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathgulpfile.js
31 lines (26 loc) · 821 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
var gulp = require('gulp'),
connect = require('gulp-connect'),
config = require('./config.json');
gulp.task('connect', function() {
connect.server({
root: 'app',
livereload: true
});
});
gulp.task('html', function () {
gulp.src('./app/*.html')
.pipe(connect.reload());
});
gulp.task('watch', function () {
gulp.watch(['./app/*.html'], ['html']);
gulp.watch(['./src/*.js'], ['scripts']);
});
gulp.task('scripts', function(){
gulp.src(config.vendor_files.js)
.pipe(gulp.dest(config.build_dir + '/js/vendor'))
gulp.src(config.dist_files.js)
.pipe(gulp.dest(config.build_dir + '/dist'))
gulp.src(config.dist_files.assets)
.pipe(gulp.dest(config.build_dir + '/dist/assets'));
});
gulp.task('default', ['scripts','connect', 'watch']);