G
G
gaalev2019-08-29 16:58:02
css
gaalev, 2019-08-29 16:58:02

Gulp live reload not working, what should I do?

Somewhere I saw that it is possible to make the page in the browser automatically updated, later I found out that we are talking about gulp livereload. Installed node.js, updated npm entered all commands from the gulp site and npm install --save-dev gulp-livereload.
Then I ended up with this gulpfile.js:
var
gulp = require("gulp"),
livereload = require("gulp-livereload");
gulp.task("reload-css", function()
{
gulp.src('/src/*.css')
.pipe(livereload());
});
gulp.task("default", function()
{
livereload.listen(); installed browser extension. Then everything goes wrong:
gulp.watch('./src/*.css', gulp.series('reload-css'));
});
when executing the gulp command, everything is fine, when the css file changes, it says "Starting 'reload-css'..." , but nothing happens on the page in the browser. Help the fool

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