BrowserSync / browsersync.github.io

Source code for http://browsersync.io
68 stars 46 forks source link

Gulp 4 #56

Open iparr opened 7 years ago

iparr commented 7 years ago

This documentation page includes the line:

This will be easier in gulp 4.x.x

Could an example of reloading the JS appropriately be provided?

I think many of us have started using Gulp 4 and guidance on this particularly would be really helpful.

Thank you.

revelt commented 7 years ago

I guess the answer example would be using gulp.series() and put the reload in the end, called in a post 2.0.0 syntax:

export function reload () {
  return new Promise(function (resolve) {
    bs.reload()
    resolve()
  })
}

?

I agree, any help with Gulp 4-specific examples would greatly save time.

revelt commented 7 years ago

There's a new recipe for Gulp v4 covering BrowserSync: https://github.com/gulpjs/gulp/blob/4.0/docs/recipes/minimal-browsersync-setup-with-gulp4.md