Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

171
Vistas
Does gulp initialize browserSync only once, even if being initiated in a task that executes multiple times?

I have the following code in my gulp file:

...
function styles () {  
  browserSync.init({
    proxy: "https://localhost",  //use your own server uri
    port: 8000  //use your own port
  });

  return gulp.src(paths.scss.src)
  .pipe(sourcemaps.init())
  .pipe(sass().on('error', sass.logError))
  .pipe(gulp.dest(paths.scss.dest))
  .pipe(browserSync.stream()) 
}

const build = gulp.series(styles);
gulp.watch(paths.scss.watch, build);  

exports.default = build

As you can see browserSync.init is being called every time styles event runs. styles runs on every change in scss files. The first time browserSync.init ran, it opened a new tab in the browser, but I expect it to do that every time styles run -- which doesn't happen, why?

about 4 years ago · Juan Pablo Isaza
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda