0

I've got liveReload working fine with scss and js, but not with html. here are my tasks...

var gulp = require('gulp'),
    liveReload = require('gulp-livereload');

    gulp.task('watchFiles', function () {
        liveReload.listen();
        gulp.watch('src/**/*.scss', ['compileSass']);
        gulp.watch('src/**/*.html', ['watchHtmlFiles']);
        gulp.watch('src/**/*.js', ['bundle-app']); 
    }); 

I needed to use run-sequence to assure my templates were built before bundling..and replaceIndex is a simple pipe for index.html over from 'src' to 'dist'

var gulp = require('gulp'),
    runSequence = require('run-sequence'),
    liveReload = require('gulp-livereload');

    gulp.task('watchHtmlFiles', function (callback) {
        runSequence('templates', 'bundle-app', 'replaceIndex', callback);
    }); 

I get an error if I include ".pipe(liveReload())" as part of the callback...so I added it to the bundle-app and replaceIndex tasks. But this doesn't work....

ernestson
  • 81
  • 1
  • 9

1 Answers1

0

this is now working, with no additional changes! The only thing I can attribute this sudden shift is that I was running another angular project with karma running. When that was shut down, live Reload for html files works fine....

ernestson
  • 81
  • 1
  • 9