Before executing "var bs = browserSync.create();", I would like to kill browserSync if a browserSync process is running.
Is it correct that exit() method needs a browsersync instance? ( https://www.browsersync.io/docs/api#api-exit)
What is the best way ?
//A gulp script
var browserSync = require('browser-sync');
//Step 1 --- Kill browsersync
?
//Step2 --- Start browsersync
var bs = browserSync.create();