Foundation-emails: On making any changes in html, browser reloads only once.

Created on 28 Apr 2016  路  18Comments  路  Source: foundation/foundation-emails

I just set up foundation for emails. The problem that I'm facing currently is -

I run npm start, the browser window opens. Now, if i make any changes in html and save. Browser will reload. But, this happens only once. Next time i make changes again, the browser won't reload. Even on manual reload the content doesn't get updated.

Please help. Thanks!

awaiting reply bug help wanted zurb stack

Most helpful comment

@nyates42 @wesdekoninck @dseidl Can you guys please try the following changes that I have done?
Works for me.

Change from line number 101 to 104 in file: gulpfile.babel.js

gulp.watch('src/pages/**/*.html').on('change', gulp.series(pages, inline, browser.reload)); gulp.watch(['src/layouts/**/*', 'src/partials/**/*']).on('change', gulp.series(resetPages, pages, inline, browser.reload)); gulp.watch(['../scss/**/*.scss', 'src/assets/scss/**/*.scss']).on('change', gulp.series(sass, pages, inline, browser.reload)); gulp.watch('src/assets/img/**/*').on('change', gulp.series(images, browser.reload));

All 18 comments

Hi, I am also having this problem. It seems to be stuck on "reloading browsers...". I have to stop the process and then run "npm start" again to view any changes. Manually refreshing the browser doesn't work either unless that process has been stopped and restarted.

Same problem here too.I tried several node versions.
What i find suspicious is the anonymous task which is starting.

screen shot 2016-04-28 at 15 13 52

I was having the same issue. Updating my foundation-cli npm package seemed to resolve the issue. Try running this command:

npm update foundation-cli

Good luck!

UPDATE: Unfortunately, it only worked for about 2 minutes and then it started getting stuck on the [BS] Reloading Browsers... call again...

Previously I uninstalled the foundation cli and reinstalled it. I tried starting a new project as well. Neither solution helped. I just tried running that command as well but there is nothing to update.

Hey @rafibomb! Is it possible for you to please check and give a fix? Thanks a lot!

@nyates42 @wesdekoninck @dseidl Can you guys please try the following changes that I have done?
Works for me.

Change from line number 101 to 104 in file: gulpfile.babel.js

gulp.watch('src/pages/**/*.html').on('change', gulp.series(pages, inline, browser.reload)); gulp.watch(['src/layouts/**/*', 'src/partials/**/*']).on('change', gulp.series(resetPages, pages, inline, browser.reload)); gulp.watch(['../scss/**/*.scss', 'src/assets/scss/**/*.scss']).on('change', gulp.series(sass, pages, inline, browser.reload)); gulp.watch('src/assets/img/**/*').on('change', gulp.series(images, browser.reload));

@iamsankalp - That did the trick for me.

Note: You need to remove the extra } at the end of the replacement code you listed.

Thanks @wesdekoninck! Updated!

@iamsankalp Awesome! Are you able to submit a PR against the foundation-emails-template so this can updated for all?

That did the trick for me also. Thanks @iamsankalp !

Hey, @rafibomb! Sent. Please check.

I was having this same problem after updating to 2.1 @iamsankalp fix appears to have solved the problem. Thanks!

Thanks @iamsankalp this was $$$. Too bad I searched for an hour or two before finding this post!

Thank you @iamsankalp, much appriciated!

@rafibomb make sure you merge this ASAP! The framework is essentially un-usable right now without doing the process @iamsankalp describes above! Also Babel still needs to be included!

On foundation for sites, I only needed to add gulp.watch('src/pages/**/*.html').on('change', gulp.series(pages, inline, browser.reload)); and gulp.watch(['src/layouts/**/*', 'src/partials/**/*']).on('change', gulp.series(resetPages, pages, inline, browser.reload));

Thanks @iamsankalp

@iamsankalp works awesome, thanks
btw it's better to use ``` formatting for multiline strings

I guess I forgot to close this - the PR by @iamsankalp resolves this and has been merged!

https://github.com/zurb/foundation-emails-template/pull/18

Was this page helpful?
0 / 5 - 0 ratings