From 4d5b4dd4c57408943f170b93f6913b6b4fc7f194 Mon Sep 17 00:00:00 2001 From: Viktor Verebelyi Date: Mon, 4 Jul 2016 04:33:31 +0100 Subject: [PATCH 01/10] Added code for pushing notification to the client --- gulp/watch.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gulp/watch.js b/gulp/watch.js index d140558..3cbd458 100644 --- a/gulp/watch.js +++ b/gulp/watch.js @@ -34,6 +34,6 @@ gulp.task('watch', ['inject'], function () { }); gulp.watch(path.join(conf.paths.src, '/app/**/*.html'), function(event) { - browserSync.reload(event.path); + browserSync.notify("reload:ng:views");//Push notification to clien with browserSync }); }); From baaa175d91ccbda67a857e5b739f4ff384c65001 Mon Sep 17 00:00:00 2001 From: Viktor Verebelyi Date: Mon, 4 Jul 2016 04:37:00 +0100 Subject: [PATCH 02/10] Added gulp-remove-html to package.json --- package.json | 1 + 1 file changed, 1 insertion(+) diff --git a/package.json b/package.json index a062cac..bf87e70 100644 --- a/package.json +++ b/package.json @@ -23,6 +23,7 @@ "gulp-ng-annotate": "~1.1.0", "gulp-prompt": "^0.1.2", "gulp-protractor": "~1.0.0", + "gulp-remove-html": "~1.1.2", "gulp-rename": "^1.2.2", "gulp-replace": "~0.5.4", "gulp-rev": "~6.0.1", From 371069dca82444933eb5a557ff35baa68d21e4c8 Mon Sep 17 00:00:00 2001 From: Viktor Verebelyi Date: Mon, 4 Jul 2016 04:38:11 +0100 Subject: [PATCH 03/10] Update inject.js --- gulp/inject.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/gulp/inject.js b/gulp/inject.js index 05bf008..30ac69d 100644 --- a/gulp/inject.js +++ b/gulp/inject.js @@ -36,6 +36,7 @@ gulp.task('inject', ['scripts', 'styles', 'injectAuth', 'inject404', 'copyVendor }; return gulp.src(path.join(conf.paths.src, '/index.html')) + .pipe(gulpRemoveHtml()) .pipe($.inject(injectStyles, injectOptions)) .pipe($.inject(injectScripts, injectOptions)) .pipe(wiredep(_.extend({}, conf.wiredep))) @@ -70,4 +71,4 @@ var injectAlone = function (options) { .pipe($.inject(injectStyles, injectOptions)) .pipe(wiredep(_.extend({}, conf.wiredep))) .pipe(gulp.dest(path.join(conf.paths.tmp, '/serve'))); -}; \ No newline at end of file +}; From 503adad637d77f02095e7a8fc7a81cda1b8f696b Mon Sep 17 00:00:00 2001 From: Viktor Verebelyi Date: Mon, 4 Jul 2016 04:39:45 +0100 Subject: [PATCH 04/10] Added client side code for reloading state --- src/index.html | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/src/index.html b/src/index.html index 669aa55..aa2e48e 100644 --- a/src/index.html +++ b/src/index.html @@ -74,6 +74,18 @@ + + + - \ No newline at end of file + From d86ae462982c9b91c6a90e99df21a121350980b0 Mon Sep 17 00:00:00 2001 From: Viktor Verebelyi Date: Mon, 4 Jul 2016 04:54:59 +0100 Subject: [PATCH 05/10] Update inject.js --- gulp/inject.js | 1 + 1 file changed, 1 insertion(+) diff --git a/gulp/inject.js b/gulp/inject.js index 30ac69d..765dcde 100644 --- a/gulp/inject.js +++ b/gulp/inject.js @@ -5,6 +5,7 @@ var gulp = require('gulp'); var conf = require('./conf'); var $ = require('gulp-load-plugins')(); +var gulpRemoveHtml = require('gulp-remove-html'); var wiredep = require('wiredep').stream; var _ = require('lodash'); From 096b1724464889e72ff640b0b6147666a401a830 Mon Sep 17 00:00:00 2001 From: Viktor Verebelyi Date: Mon, 4 Jul 2016 10:13:43 +0100 Subject: [PATCH 06/10] Update inject.js --- gulp/inject.js | 1 - 1 file changed, 1 deletion(-) diff --git a/gulp/inject.js b/gulp/inject.js index 765dcde..30ac69d 100644 --- a/gulp/inject.js +++ b/gulp/inject.js @@ -5,7 +5,6 @@ var gulp = require('gulp'); var conf = require('./conf'); var $ = require('gulp-load-plugins')(); -var gulpRemoveHtml = require('gulp-remove-html'); var wiredep = require('wiredep').stream; var _ = require('lodash'); From bb01385d1b53540d6c65386a87e3e54448e1531e Mon Sep 17 00:00:00 2001 From: Viktor Verebelyi Date: Mon, 4 Jul 2016 10:16:43 +0100 Subject: [PATCH 07/10] Update index.html --- src/index.html | 31 +++++++++++++++++++++---------- 1 file changed, 21 insertions(+), 10 deletions(-) diff --git a/src/index.html b/src/index.html index aa2e48e..2bd7f3b 100644 --- a/src/index.html +++ b/src/index.html @@ -74,18 +74,29 @@ - - From 141fc393d929e48a0f905588280f1c3f34c18b05 Mon Sep 17 00:00:00 2001 From: Viktor Verebelyi Date: Mon, 4 Jul 2016 10:17:42 +0100 Subject: [PATCH 08/10] Update inject.js --- gulp/inject.js | 1 - 1 file changed, 1 deletion(-) diff --git a/gulp/inject.js b/gulp/inject.js index 30ac69d..8b589b8 100644 --- a/gulp/inject.js +++ b/gulp/inject.js @@ -36,7 +36,6 @@ gulp.task('inject', ['scripts', 'styles', 'injectAuth', 'inject404', 'copyVendor }; return gulp.src(path.join(conf.paths.src, '/index.html')) - .pipe(gulpRemoveHtml()) .pipe($.inject(injectStyles, injectOptions)) .pipe($.inject(injectScripts, injectOptions)) .pipe(wiredep(_.extend({}, conf.wiredep))) From b56eaff5bd151e681b454a2e610aff77e40569a5 Mon Sep 17 00:00:00 2001 From: Viktor Verebelyi Date: Mon, 4 Jul 2016 10:18:49 +0100 Subject: [PATCH 09/10] Update watch.js --- gulp/watch.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/gulp/watch.js b/gulp/watch.js index 3cbd458..38c1134 100644 --- a/gulp/watch.js +++ b/gulp/watch.js @@ -34,6 +34,8 @@ gulp.task('watch', ['inject'], function () { }); gulp.watch(path.join(conf.paths.src, '/app/**/*.html'), function(event) { - browserSync.notify("reload:ng:views");//Push notification to clien with browserSync + var projectPath = path.join(process.cwd(),conf.paths.src); + projectPath = event.path.replace(projectPath, '').replace(/\\/g, '/'); + browserSync.notify({reload: projectPath});//Push notification to clien with browserSync }); }); From 5caa1675bb9f6e501da258941846c5c8758f9308 Mon Sep 17 00:00:00 2001 From: Viktor Verebelyi Date: Mon, 4 Jul 2016 10:19:10 +0100 Subject: [PATCH 10/10] Update package.json --- package.json | 1 - 1 file changed, 1 deletion(-) diff --git a/package.json b/package.json index bf87e70..a062cac 100644 --- a/package.json +++ b/package.json @@ -23,7 +23,6 @@ "gulp-ng-annotate": "~1.1.0", "gulp-prompt": "^0.1.2", "gulp-protractor": "~1.0.0", - "gulp-remove-html": "~1.1.2", "gulp-rename": "^1.2.2", "gulp-replace": "~0.5.4", "gulp-rev": "~6.0.1",