johnpapa / gulp-patterns

Playground for Gulp Recipes
501 stars 146 forks source link

use .once() instead of .one() #100

Closed dciccale closed 7 years ago

dciccale commented 9 years ago

prevent browserSync trying to start the same instance when the server is restarted after changing server files that are being watched by nodemon.

[error] You tried to start Browsersync twice! To create multiple instances, use browserSync.create().init()
johnpapa commented 9 years ago

why?

dciccale commented 9 years ago

to prevent that browserSync [error] notification to appear, thankfully they are telling you that you are trying to start the same browserSync instance and hence, not doing anything but warning.

also, what's the point of passing through that callback every time the server files changes if nothing is going to actually happen there?

johnpapa commented 7 years ago

seems fine to do the way you suggest, but its also working now.