gulp-webserver icon indicating copy to clipboard operation
gulp-webserver copied to clipboard

Allow passing through connect-livereload rules

Open wjdp opened this issue 7 years ago • 0 comments

My use case requires setting the rules option of live-reload. I need to put the livereload script in the head to prevent conflict with turbolinks. A quick and dirty edit of index.js like so gets me there:

  var lrServer;

  if (config.livereload.enable) {

    app.use(connectLivereload({
      port: config.livereload.port,
      rules: [{
          match: /<\/head>/i,
          fn: function (w, s) {
              return s + w;
          }
      }]
    }));

Can we have access to these options from webserver's opts?

wjdp avatar Nov 01 '16 22:11 wjdp