javascript - Gulp.js won't reload plain CSS -



javascript - Gulp.js won't reload plain CSS -

this gulpfile:

var gulp = require('gulp'), watch = require('gulp-watch'), livereload = require('gulp-livereload'); gulp.task('watch', function() { livereload.listen(); gulp.watch('./css/**/*.css', ['css']).on('change', livereload.changed); gulp.watch('./js/**/*.js', ['js']).on('change', livereload.changed); gulp.watch('./**/*.php').on('change', livereload.changed); }); gulp.task('default', [ 'watch']);

it reload css 1 time , crash error:

[15:30:13] style.css reloaded. [15:30:13] task 'css' not in gulpfile [15:30:13] please check documentation proper gulpfile formatting

not sure create of this, had similar issues?

first need create task things want css

gulp.task('css', function() { homecoming gulp.src('./css/**/*.css') .pipe(livereload()); });

then watch file, if changed, run task again.

gulp.task('watch', function() { livereload.listen(); gulp.watch('./css/**/*.css', ['css']); }); gulp.task('default', [ 'watch']);

javascript css gulp gulp-watch

Comments

Popular posts from this blog

xslt - DocBook 5 to PDF transform failing with error: "fo:flow" is missing child elements. Required content model: marker* -

mediawiki - How do I insert tables inside infoboxes on Wikia pages? -

Local Service User Logged into Windows -