From 050874bf36731a6eb21dc9276a45b3fa3942eb4e Mon Sep 17 00:00:00 2001 From: Tim Lancina Date: Thu, 10 Dec 2015 17:07:24 -0600 Subject: [PATCH] add livereload to dev tasks --- gulpfile.js | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/gulpfile.js b/gulpfile.js index c8474ce1d8..17f5f03475 100644 --- a/gulpfile.js +++ b/gulpfile.js @@ -11,6 +11,7 @@ var babel = require('gulp-babel'); var tsc = require('gulp-typescript'); var cache = require('gulp-cached'); var minimist = require('minimist'); +var connect = require('gulp-connect'); var flagConfig = { string: ['port', 'version', 'ngVersion', 'animations'], @@ -105,10 +106,9 @@ gulp.task('watch', function(done) { }); gulp.task('serve', function() { - var connect = require('gulp-connect'); connect.server({ port: flags.port, - livereload: false + livereload: true }); }); @@ -158,9 +158,16 @@ gulp.task('bundle', ['transpile'], function(done){ var config = require('./scripts/npm/ionic.webpack.config.js'); bundle({ config: config, - cb: done, + cb: finished, stats: true }); + + function finished(){ + var outputPath = config.output.path + path.sep + config.output.filename; + gulp.src(outputPath) + .pipe(connect.reload()) + .on('end', done) + } }) function bundle(args) {