How to use the reload function from browser-sync
Find comprehensive JavaScript browser-sync.reload code examples handpicked from public code repositorys.
244 245 246 247 248 249 250 251 252 253
.pipe(autoprefixer()) .pipe(sourcemaps.write()) .pipe(gulp.dest('app/css')) // Reloading the stream .pipe( browserSync.reload({ stream: true, }) ) )
290
350
14
GitHub: adobe/spectrum-css
109 110 111 112 113 114 115 116 117 118
} }); } function reload(cb) { browserSync.reload(); if (cb) { cb(); } }
191
0
48
GitHub: markserv/markserv-cli
23 24 25 26 27 28 29 30 31 32
return serverInstance } const reload = () => { log.trace('Reloading BrowserSync') browserSync.reload() } module.exports = { start,
0
4
2
15 16 17 18 19 20 21 22 23 24 25
const gulp = require('gulp'); const $ = require('gulp-load-plugins')(); const del = require('del'); const browserSync = require('browser-sync'); const reload = browserSync.reload; const merge = require('merge-stream'); const path = require('path'); const workboxBuild = require('workbox-build'); const prettyBytes = require('pretty-bytes');
0
1
0
26 27 28 29 30 31 32 33 34 35
fs.mkdirSync(dir); } bs.watch(resumeFilename).on('change', () => { reBuildResume(theme, dir, resumeFilename, () => { bs.reload(); }); }); reBuildResume(theme, dir, resumeFilename, () => { bs.init({
1
0
0
+ 2 other calls in file
105 106 107 108 109 110 111 112 113 114 115 116
gulp.watch("source/img/icon-*.svg", gulp.series("sprite", "html", "refresh")); gulp.watch("source/*.html", gulp.series("html", "refresh")).on("change", server.reload); }); gulp.task("refresh", function (done) { server.reload(); done(); }); gulp.task("start", gulp.series("css", "server"));
1
0
0
12 13 14 15 16 17 18 19 20 21 22 23
var cachebust = require('gulp-cache-bust'); var changedInPlace = require('gulp-changed-in-place'); var gulpif = require('gulp-if'); var nop = require('gulp-nop'); var runSequence = require('run-sequence'); var reload = browserSync.reload; var localization="en";
0
0
2
+ 69 other calls in file
8 9 10 11 12 13 14 15 16 17 18
const nunjucks = require('nunjucks'); const ComponentExtension = require('nunjucks-luego-component-extension'); const GetData = require('luego-get-data'); const rimraf = require('rimraf'); const browserSync = require('browser-sync'); const reload = browserSync.reload; const fs = require('fs'); const path = require('path');
0
0
1
+ 4 other calls in file
GitHub: SICMR/sicmr.com
11 12 13 14 15 16 17 18 19 20 21 22
var plumber = require('gulp-plumber') var jswrap = require('gulp-js-wrapper') var autoprefixer = require('gulp-autoprefixer') var browserSync = require('browser-sync').create() var reload = browserSync.reload // LINT JS gulp.task('lint', function () { return gulp.src('public/_js/*.js').pipe(jshint()).pipe(plumber()).pipe(jshint.reporter('default'))
0
0
1
+ 20 other calls in file
108 109 110 111 112 113 114 115 116 117 118 119
}); done(); } const browserReload = (done) => { browserSyncServer.reload(); done(); } /**
0
0
1
+ 13 other calls in file
89 90 91 92 93 94 95 96 97 98
); // Watch all my sass files and compile sass if a file changes. watch(['./src/stories/global/base/**/*.json'], series(buildVariables, compileSass, concatCSS, (done) => { server.reload('*.css'); done(); }) ) watch(
0
0
7
+ 19 other calls in file
GitHub: zzoofe/158_teboil_new
10 11 12 13 14 15 16 17 18 19 20
const postcss = require("gulp-postcss"); const tailwindcss = require('tailwindcss'); const autoprefixer = require('autoprefixer'); const sass = require('gulp-sass'); const browserSync = require('browser-sync').create(); const reload = browserSync.reload; let emittyPug; let errorHandler;
0
0
1
+ 18 other calls in file
GitHub: Khayotbek1/marmelad
155 156 157 158 159 160 161 162 163 164
stream.on('end', () => { console.log(`[nunjucks] ${hasError ? bold(red('ERROR')) : bold(green('done'))} in ${(performance.now() - njkStartPerf).toFixed(0)}ms`); if (!hasError) { bsSP.reload(); } done(); });
0
0
0
+ 6 other calls in file
35 36 37 38 39 40 41 42 43 44 45 46
done(); } // BrowserSync reload function browserSyncReload(done) { browsersync.reload(); done(); } // Clean vendor
0
0
0
GitHub: thanhdien02/mogo
54 55 56 57 58 59 60 61 62 63
}) ) .pipe(pug({ pretty: true })) .pipe(dest(options.views.dest)) .pipe( browsersync.reload({ stream: true, }) ); }
0
0
0
+ 2 other calls in file
browser-sync.init is the most popular function in browser-sync (523 examples)