moudy / broccoli-taco

Static Sites Powered by Broccoli
http://broccoli-taco.com/
94 stars 14 forks source link

Changing JSON files does not live reload properly #6

Closed michaellopez closed 9 years ago

michaellopez commented 9 years ago

Using data.json files does not update via live reload properly. You have to restart the server.

Is this intended behavior?

How to reproduce

broccoli-taco new my-site
cd my-site && npm install
mv site/pages/data.js site/pages/data.json
echo "{\"title\":\"Hello\"}" > site/pages/data.json
broccoli-taco serve

Expected result: The title should update via live reload to the changed value in data.json files.

Actual result: The title does not update in the browser even though the terminal shows that it identified the change, the live reload appears to do its thing and a refresh does occur. But the title does not update. I'm using Chrome with this LiveReload plugin

Using data.js does update the title properly. This issue only happens with JSON files.

moudy commented 9 years ago

@michaellopez thanks to the detailed steps to reproduce and for finding this bug. This is not the intended behavior.

I just pushed a fix and published version 0.0.7 to NPM. This should fix it, let me know if not.

michaellopez commented 9 years ago

@moudy Yes, that fixed it. Thank you so much for the fast response and fix!