How to use the watch function from browser-sync
Find comprehensive JavaScript browser-sync.watch code examples handpicked from public code repositorys.
24 25 26 27 28 29 30 31 32 33 34
module.exports = function ({ port, theme, silent, dir, resumeFilename }) { if (!fs.existsSync(dir)) { fs.mkdirSync(dir); } bs.watch(resumeFilename).on('change', () => { reBuildResume(theme, dir, resumeFilename, () => { bs.reload(); }); });
1
0
0
+ 2 other calls in file
GitHub: admindinge/totfront
55 56 57 58 59 60 61 62 63 64 65
browserSync.init({ server: { baseDir: './' } }); browserSync.watch('./', browserSync.reload); } exports.styles = styles; exports.scripts = scripts;
0
0
0
browser-sync.init is the most popular function in browser-sync (523 examples)