Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Yeoman: LiveReload vs. Yeoman Watch

I'm trying out Yeoman Server for the first time and see that it offers a native watch tool as a fallback to LiveReload. Here's how the docs explain the fallback:

"[Yeoman Server] automatically fires up the yeoman watch process, so changes to any of the application's files cause the browser to refresh via LiveReload. Should you not have LiveReload installed locally, a fallback reload process will be used instead."

So far the fallback process is working perfectly, and I like that it doesn't require installing anything in the browser/menu bar.

Has anyone tried both watch tools with Yeoman? How is the workflow different and what additional features do you get if you "upgrade" to LiveReload?

UPDATE: A quick inspection of the API revealed that Yeoman's live reload feature is in fact LiveReload. They're one and the same. The reason it works without the browser extensions is because they're using LiveReload's snipvr snippet instead. It's possible there are some additional features accessible via the LiveReload GUI and perhaps for mobile device testing, but more likely the functionality is identical.

like image 385
cantera Avatar asked Sep 11 '12 01:09

cantera


1 Answers

As noted in my update, I checked the Yeoman source and realized that the live reload feature is in fact LiveReload. They're one and the same. It's pretty cool of LR's creator, Andrey Tarantsov, to let his valuable tool be used in a popular, open-source project like this without charging for its use.

The reason Yeoman Watch works without the browser extensions is because it's using LiveReload's snipvr snippet instead.

As a result, the functionality of LiveReload and running 'yeoman watch' is essentially identical. However, I find that there's still benefit to owning LiveReload. My preferred workflow is to combine LiveReload and CodeKit.

During (pre-build) development, I use CodeKit to compile my Sass/Compass files and Jade templates (another fantastic tool, btw) since CodeKit's config options are a little more extensive than LiveReload's. Since CodeKit doesn't work with Firefox (only Chrome and Safari), I run LiveReload concurrently so that I can see changes live in both browsers.

This workflow also has the added benefit of being able to "fork on the fly" by mixing LiveReload's "custom command" feature with CodeKit's "advanced compiler settings" feature.

like image 159
cantera Avatar answered Sep 28 '22 16:09

cantera