-
Notifications
You must be signed in to change notification settings - Fork 132
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Integrate Browsersync #681
Conversation
🎉 What's the best way to test a site with a non-published version of roots? |
|
Great. Thanks. Do I need to merge |
Nope, just check out this branch and you're set! |
|
2 other repos (my original image demo + axis-www) give this error:
which shuts down the watcher |
Ah great that kind of bug is just what I was after. Nice catch. Fixed in the latest commit, pull down and try again! |
Dope. Thanks for the help here. I'm going to try to smooth out a couple things and run some tests on a couple larger carrot projects. When these are ready, I'll ship this guy and we can get back to making real progress with this codebase, finally. |
Thanks as always. I ❤️ roots |
Build failing due to manual call to Also, the |
@bs.notify('<div id="roots-load-container"><div id="roots-compile-loader"> | ||
<div id="l1"></div><div id="l2"></div><div id="l3"></div><div id="l4"></div> | ||
<div id="l5"></div><div id="l6"></div><div id="l7"></div><div id="l8"></div> | ||
</div></div>') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just a formatting preference thing, but any reason you're not using CoffeeScript's awesome multiline strings for embedded HTML snippets?
@bs.notify """
<div id="roots-load-container">
<div id="roots-compile-loader">
<div id="l1"></div>
<div id="l2"></div>
<div id="l3"></div>
<div id="l4"></div>
<div id="l5"></div>
<div id="l6"></div>
<div id="l7"></div>
<div id="l8"></div>
</div>
</div>
"""
I have a few ideas: Replacing Chokidar entirelyIf the Enabling live-injection of compiled assetsFollowing the above change, observing the compiled output and calling
Selective Compile / Incremental BuildsI'm not 100% certain on Roots' internals, but on Windows when I change a file Roots seems to compile every file, rather than just the one being changed. Between the 3-7s time it takes to finish compiling on a busy machine running git shell through a console emulator alongside a running Node server and the time it takes to reload the page (often not reloading at all), which is a common workflow for Node development on Windows, this can become rather irksome. I think |
|
Nice job. Certainly fixed the issues I was having with images. I did find one slight niggle though, which was introduced somewhere in this PR. When running |
@molovo my guess is browser-sync is opening the browser window. It seems passing This change allows you to pass options to Put this together and: app.coffee module.exports =
...
browser:
open: false Perhaps it might be a good idea to set this automatically if the respective root's "no open" config settings are present... /cc @Jenius |
Well, we either change the docs or roots. I think the
|
#693 Now fixed |
Make --no-open have effect once again.
Call correct api to stop the server. Callback from stop() function.
Any update on the dependency graph issue? |
@FaizShah nope, there will not be one until a new major version of roots comes out. getting a consistent dependency graph with a large number of flexible compiled languages is immensely difficult. Next version is in the works though and will guaranteed have incremental builds with full dependency trees, and slightly restricted available languages. More info on this as things stabilize, which they are not even close to now. |
@Jenius Great, thanks for the info. Good luck with v4! |
Ok finally this looks ready to go imho. All dependencies up to date, browsersync working nicely 😀 |
🎊 |
whooot! |
Ok guys here it is, the big integration.
This still needs a bit more polish, but is working fully. Server works, reloads work, no bugs or edge cases I have been able to find. Would love to have some people pull this down and run it with their projects!
This PR depends on #680, and in fact both require each other in order to have a functional roots (a bug in infestor is causing a problem with images). However, I wanted to keep the PRs separate for clarity.