blob: b96578627d02b6ccd859897f8c2add6c318a16c6 [file] [log] [blame]
Iftekharul Islam99d199f2017-03-24 15:28:25 -05001var options = require('../gulp-options.js'),
2 gulp = require('gulp'),
3 connect = require('gulp-connect'),
4 distribution = require('./distribution.js');
5
6var runSequence = require('run-sequence');
7
8gulp.task('distribution', function (callback) {
9 return distribution(callback);
10});
11
12gulp.task('connect', function() {
13 connect.server({
14 root: 'dist',
15 livereload: true
16 });
17});
18
19gulp.task('livereload', function() {
20 gulp.src(['./dist/**/*.html','./dist/**/*.js','./dist/**/*.css'])
21 .pipe(connect.reload());
22});
23
24gulp.task('watch', function () {
25 gulp.watch('./app/**/*', function(callback){
26 return runSequence('distribution', 'livereload');
27 });
28});
29
30module.exports = function (callback) {
31 return runSequence('connect', 'watch', callback);
32};