foundation-emails icon indicating copy to clipboard operation
foundation-emails copied to clipboard

On making any changes in html, browser reloads only once.

Open iamsankalp opened this issue 10 years ago • 18 comments

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!

iamsankalp avatar Apr 28 '16 13:04 iamsankalp

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.

nyates42 avatar Apr 28 '16 13:04 nyates42

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

dseidl avatar Apr 28 '16 13:04 dseidl

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...

wesdekoninck avatar Apr 28 '16 13:04 wesdekoninck

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.

nyates42 avatar Apr 28 '16 13:04 nyates42

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

iamsankalp avatar Apr 28 '16 13:04 iamsankalp

@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 avatar Apr 28 '16 15:04 iamsankalp

@iamsankalp - That did the trick for me.

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

wesdekoninck avatar Apr 28 '16 15:04 wesdekoninck

Thanks @wesdekoninck! Updated!

iamsankalp avatar Apr 28 '16 15:04 iamsankalp

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

rafibomb avatar Apr 28 '16 21:04 rafibomb

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

ghost avatar Apr 28 '16 21:04 ghost

Hey, @rafibomb! Sent. Please check.

iamsankalp avatar Apr 28 '16 21:04 iamsankalp

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

scottbickell avatar Apr 28 '16 21:04 scottbickell

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

ineptian avatar Apr 28 '16 23:04 ineptian

Thank you @iamsankalp, much appriciated!

nyates42 avatar Apr 29 '16 00:04 nyates42

@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!

ineptian avatar Apr 29 '16 15:04 ineptian

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

cipriantepes avatar Apr 30 '16 08:04 cipriantepes

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

syabro avatar May 02 '16 05:05 syabro

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

rafibomb avatar May 13 '16 17:05 rafibomb