How to use the browser-sync.stream function in browser-sync

To help you get started, we’ve selected a few browser-sync examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github datashaman / wifidog-auth-flask / gulpfile.js View on Github external
gulp.task('styles', function() {
    return es.concat(gulp.src(vendorStyles), sass(siteStyles))
        .pipe(plugins.concat('screen.min.css'))
        .pipe(plugins.autoprefixer('last 2 versions', 'safari 5', 'ie 8', 'ie 9', 'opera 12.1', 'ios 6', 'android 4', 'Firefox >= 4'))
        // .pipe(isProduction ? plugins.combineMediaQueries({ log: true }) : gutil.noop())
        .pipe(isProduction ? plugins.cssnano() : gutil.noop())
        .pipe(plugins.size())
        .pipe(gulp.dest('./auth/static/styles'))
        .pipe(browserSync.stream());
});
github sergiocruz / react-connect4 / gulpfile.babel.js View on Github external
function bundle() {

  gutil.log('Compiling JS...');

  return bundler.bundle()
    .on('error', (err) => {
      gutil.log(err.message);
      browserSync.notify('Browserify Error!');
      this.emit('end');
    })
    .pipe(exorcist('public/js/bundle.js.map'))
    .pipe(source('bundle.js'))
    .pipe(gulp.dest('public/js'))
    .pipe(browserSync.stream({once: true}));
}
github cleverage / garden-starter-kit / .gsk / pipe / js / concat.js View on Github external
return merge.apply(this, FILES.map(function(file) {
    return gulp.src(file.src)
      .pipe(plumber({ errorHandler: err }))
      .pipe(sourcemap.init())
      .pipe(concat(file.dest))
      .pipe(gif(ENV.all.optimize, uglify()))
      .pipe(sourcemap.write('.'))
      .pipe(gulp.dest(DEST))
      .pipe(bs.stream());
  }));
github kremalicious / blog / gulpfile.babel.js View on Github external
export const css = () =>
    src([
        SRC + '/_assets/styl/kremalicious3.styl',
        SRC + '/_assets/styl/post-*.styl'
    ])
        .pipe($.if(!isProduction, $.sourcemaps.init()))
        .pipe($.stylus({ 'include css': true })).on('error', onError)
        .pipe($.postcss(plugins)).on('error', onError)
        .pipe($.if(!isProduction, $.sourcemaps.write()))
        .pipe($.if(isProduction, $.header(BANNER, { pkg })))
        .pipe($.rename({ suffix: '.min' }))
        .pipe(dest(DIST + '/assets/css/'))
        .pipe(browser.stream())
github Snugug / gulp-armadillo / tasks / scripts.js View on Github external
gulp.task('js', 'Compiles JavaScript files with Rollup and runs results through Babel', () => {
    return scripts.compile()
        .on('error', failure('js'))
      .pipe(gulp.dest(task.dest(config.folders.js)))
      .pipe(sync.stream({
        match: '**/*.js',
      }));
  });
github rndsolutions / hawkcd / Server / ui / gulp / scripts.js View on Github external
gulp.task('scripts-reload', function() {
  return buildScripts()
    .pipe(browserSync.stream());
});
github vigetlabs / blendid / gulpfile.js / tasks / svgSprite.js View on Github external
const svgSpriteTask = function() {

  const settings = {
    src: projectPath(PATH_CONFIG.src, PATH_CONFIG.icons.src, '*.svg'),
    dest: projectPath(PATH_CONFIG.dest, PATH_CONFIG.icons.dest)
  }

  return gulp.src(settings.src)
    .pipe(svgstore(TASK_CONFIG.svgSprite.svgstore))
    .pipe(gulp.dest(settings.dest))
    .pipe(browserSync.stream())
}
github xcjs / blur-monitor / gulp / scripts.js View on Github external
gulp.task('scripts-reload', function() {
  return buildScripts()
    .pipe(browserSync.stream());
});
github trainline / environment-manager / client / gulp / scripts.js View on Github external
gulp.task('scripts-reload', function () {
  return buildScripts()
    .pipe(browserSync.stream());
});
github jsbench / jsbench.github.io / gulpfile.babel.js View on Github external
function rebundle() {
		const stream = bundler.bundle();

		return stream.on('error', handleErrors)
			.pipe(source(file))
			.pipe(gulp.dest(config.scripts.dest))
			.pipe(browserSync.stream());
	}