Famous / famous-cli

Other
28 stars 20 forks source link

Live browser reloads? #9

Open JeremySaks opened 9 years ago

JeremySaks commented 9 years ago

After famous create testproject cd/testproject and famous dev the famous seed project loads as expected but no changes in src/index.js are live reloaded to the browser. In fact they are not reloaded after reloading the browser page. I can comment out the whole file without changes picked up.

The changes are only picked up once I shut down the server and restart with famous dev.

Am I missing something obvious here? I'm on OS X Yosemite and Chrome (also checked Firefox). No errors in the console.

MylesBorins commented 9 years ago

The changes should be refelcted, but we do not have live reload enable. We'll be digging into this,

wgester commented 9 years ago

@JeremySaks Are you still seeing this issue? We've decided against enabling live reload by default, it might be a future flagged option, but for now there's a watch task which should be working.

JeremySaks commented 9 years ago

@wgester I'm still seeing the issue. I updated to 0.2.10 and added a fresh starter project with famous create. Changes to src/index.js are not picked up after a browser refresh.

MylesBorins commented 9 years ago

Have you turned off caching in the browser? On Jun 4, 2015 9:31 AM, "Jeremy Saks" notifications@github.com wrote:

@wgester https://github.com/wgester I'm still seeing the issue. I updated to 0.2.10 and added a fresh starter project with famous create. Changes to src/index.js are not picked up after a browser refresh.

— Reply to this email directly or view it on GitHub https://github.com/Famous/famous-cli/issues/9#issuecomment-108958507.

JeremySaks commented 9 years ago

I have not. Is that something I ought to be doing? I don't see an entry for localhost:1618 in chrome://appcache-internals/

MylesBorins commented 9 years ago

In the developer tools you will want to click the gear in the top left corner and click the check box next to 'disable cache'

If you have trouble I'll follow up with a photo when I'm by my computer On Jun 4, 2015 9:37 AM, "Jeremy Saks" notifications@github.com wrote:

I have not. Is that something I ought to be doing? I don't see an entry for localhost:1618 in chrome://appcache-internals/

— Reply to this email directly or view it on GitHub https://github.com/Famous/famous-cli/issues/9#issuecomment-108960807.

JeremySaks commented 9 years ago

It doesn't appear to have helped. I've checked off 'Disable cache' but updates are not being picked up.

MylesBorins commented 9 years ago

and you are manually hitting refresh? there is no live reload

JeremySaks commented 9 years ago

Yes, just hitting the browser refresh button. As well as closing and opening new tabs.

MylesBorins commented 9 years ago

are you seeing anything in your terminal when you change the files?

JeremySaks commented 9 years ago

Yes, it's doing get requests with each reload. I'm happy to set up a screen share as well if you think it will be of any help to you.

MylesBorins commented 9 years ago

you should see output from watchify every time you save a file

JeremySaks commented 9 years ago

That I don't see.

MylesBorins commented 9 years ago

that is definitely odd...

can you try rm -rf node_modules then running dev again

JeremySaks commented 9 years ago

Wait, is there possibly an extended lag between changes to the source files and updates? I am now getting some very anomalous behavior.

I added a console.log(Math.random()); to src/index.js just to test and it is just now being picked up on each reload. I added it a few minutes ago. But when I add another console.log("Testing"); it is not picked up on reloads. Some other small experiments like changing the logo dimensions with .setAbsoluteSize are also not picked up with reloads. So now I'm truly confused.

^^ ok trying the rm from your last message.

MylesBorins commented 9 years ago

The update take a sub second to be picked up� bit it isn�t immediate

JeremySaks commented 9 years ago

rm -rf node_modules and famous dev has not changed things. in addition most of the file changes don't seem to get picked up even after allowing for some lag.

wgester commented 9 years ago

What OS are you using?

JeremySaks commented 9 years ago

OS X Yosemite v10.10.3