A
A
Alexander Gamov2014-10-27 21:02:29
HTML
Alexander Gamov, 2014-10-27 21:02:29

Why doesn't gulp-connect livereload work?

Nivkakuyu does not want to work livereload. I freaked out, inserted an example from the page of the gulp-connect plugin itself, nothing too.

var gulp = require('gulp'),
  connect = require('gulp-connect');

gulp.task('connect', function() {
  connect.server({
    root: 'dev',
    livereload: true
  });
});

gulp.task('html', function () {
  gulp.src('./dev/*.html')
    .pipe(connect.reload());
});

gulp.task('watch', function () {
  gulp.watch(['./dev/*.html'], ['html']);
});

gulp.task('default', ['connect', 'watch']);

I suspect that the problem was when installing modules - when stopping the execution of the watch through ctrl + c to the beginning of the line.
0b16f3d12fd444f8bcafdac69660b8d4.png
As a result, this ubuntu bug was not noticed immediately and I puzzled for an hour why the watch does not beat off events)
But transferring the json file + npm install they didn’t give anything, except for a new problem with the fact that some plugins refused to be installed without sudo ... (before that, in the first project, I also had to install with via sudo, perhaps precisely because of the bug with the terminal shown above)

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question