gulp-flow-livereload
v1.0.0
Published
gulp-flow-livereload bundle for gulp-flow.
Downloads
1
Maintainers
Readme
gulp-flow-livereload
Livereload bundle for gulp-flow.
Requirements
- gulp-flow must be installed.
Install
npm install --save-dev gulp-flow-livereload
Usage
A simple example:
gulpfile.js
let gulp = require('gulp');
let flow = require('gulp-flow');
let {cfg, gp} = flow;
// load the livereload bundle
require('gulp-flow-livereload');
// just for an example in the real word,
// load (custom) webpack bundle
require('./tasks/bundles/webpack');
gulp.task('local.build.webpack', function() {
return gulp.src(cfg.webpack.entry.main)
.pipe(gp.webpack(cfg.webpack))
.pipe(gulp.dest(cfg.publicJsDir))
.pipe(gp.livereload())
;
});
gulp.task('local.watch', function(done) {
gp.livereload.listen();
gulp.watch('./src/**/*.{js,jsx}', gulp.series('local.build.webpack'));
done();
});
Now, browser page is refreshed when the task local.build.webpack
is executed.
See gulp-livereload for more details.
LICENSE
MIT (c) 2016, Nicolas Tallefourtane.
Author
| | |---| | Nicolas Talle | | |