A
A
Alex Polyakh2017-02-23 22:23:05
JavaScript
Alex Polyakh, 2017-02-23 22:23:05

Why does JS build happen after gulp browser reload?

When I make changes to JS in the console, I don't see any changes. I'll leave the link on github, please take a look, good people.
Console screenshot:
prntscr.com/ecjgbd
Link to github/gulpfile.js:
https://github.com/polyakh/project-npm/blob/06d186...

Answer the question

In order to leave comments, you need to log in

2 answer(s)
S
sasha, 2017-02-24
@madmages

tin is mixed with you.
at startup, you run gulp.task('watch', ['sass', 'gulp-pug', 'build-js', 'babel', 'browser-sync']
this array does not mean that it will go in this in the order as you wrote here, you might get lucky and the build will work first then the sync. you obviously need to call browsersync reload after compiling js. ); this thing is generally wild, because you have both the sorts and the bundle are in this folder, and consider that the browsersync will always twitch, which is also crazy.

A
Alexander Rogachev, 2017-03-24
@volkano

After .pipe(gulp.dest())
write .on('end', browserSync.reload);

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question