TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

LiveReload: Reflect CSS Changes Instantly, with No Browser Reload

46 pointsby Bartletover 13 years ago

10 comments

newhousebover 13 years ago
Sigh, these sorts of things always force you to change how you develop and don't really work for mobile web dev. This wheel seems to been re-invented far too often.<p>Alternatively:<p><pre><code> sudo pip install watchdog watchmedo shell-command -w -c "make" -i '*/.*' -R </code></pre> Where "make" is either for a makefile or some other build script.<p>And then just put live.js (from <a href="http://livejs.com/" rel="nofollow">http://livejs.com/</a>) as a script inside your pages.<p>This works anywhere with basically any stack (i.e. if you had some strange alien CSS preprocessor as long as it can be processed with a command you can use this), integrates into your normal build system and requires no browser plugins or proprietary binaries.
评论 #3172984 未加载
评论 #3173510 未加载
benatkinover 13 years ago
I have a mac, but prefer to use just Guard and the browser extensions. Fortunately, that info is still available:<p><a href="https://github.com/mockko/livereload" rel="nofollow">https://github.com/mockko/livereload</a><p>After all the time that's been put into the free version by others I wish livereload.com would have a prominent link to it. But I'm glad that the gem, which I don't use because <a href="https://github.com/guard/guard-livereload" rel="nofollow">https://github.com/guard/guard-livereload</a> is easier to install, and the browser extensions are available under the MIT license.
评论 #3173774 未加载
评论 #3173449 未加载
hejdadigover 13 years ago
Another alternative is <a href="https://github.com/mape/node-hotcode" rel="nofollow">https://github.com/mape/node-hotcode</a><p>Has page reload and doesn't require any project specific settings.<p>It is open source and works (web app using an iframe + path to watch) without altering development habits.
ComputerGuruover 13 years ago
I don't get it... how freaking hard can it be to hit F5?<p>I'm not trying to be snarky - I'm just genuinely surprised that no one has posted that they consider the need for "live refresh" to be wholly unnecessary.<p>I come from a background in C++ development where compile times range anywhere from a minute to a day, so I'm truly thankful for "instant compilation" of CSS and HTML via a single click of a keyboard button..... but I wouldn't ever dream that my need to hit the F5 key was hindering my development ability!
评论 #3173949 未加载
评论 #3173852 未加载
glenboover 13 years ago
The technology that drives this is undoubtedly very interesting, but what does this truly offer? What would be the practical application of this?<p>Are there droves of people who could benefit from constantly changing css?<p>Perhaps I'm just missing something rather obvious. If so, please help me.
评论 #3172874 未加载
评论 #3173455 未加载
sixcornersover 13 years ago
Could just use Google Chrome and test your changes with this file:<p>C:\Users\Administrator\AppData\Local\Google\Chrome\User Data\Default\User StyleSheets\Custom.css<p>Every time it is saved the changes are reflected on all open webpages instantly.
评论 #3173377 未加载
andreyvitover 13 years ago
Hey! Woke up this morning to find LiveReload on HN home page. Ask me anything, I guess. :)
评论 #3173825 未加载
dhxover 13 years ago
Epiphany (web browser bundled with the Gnome desktop environment) has supported a reduced version of this functionality for a number of years now. It's fairly easy to implement with the dnotify functionality of the Linux kernel.
usesover 13 years ago
I have good luck with using Chrome's CSS editor, then right clicking and hitting "Save As". You can keep working without reloading, and periodically save your changes back.
评论 #3173645 未加载
leanover 13 years ago
Look cool, let me know when there's a PC version.
评论 #3172854 未加载
评论 #3173466 未加载
评论 #3173461 未加载