gulp-flow-livereload

1.0.0 • Public • Published

gulp-flow-livereload

Livereload bundle for gulp-flow.

Requirements

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 Tallefourtane - Nicolab.net
Nicolas Talle
Make a donation via Paypal

Package Sidebar

Install

npm i gulp-flow-livereload

Weekly Downloads

1

Version

1.0.0

License

MIT

Last publish

Collaborators

  • nicolab