Closed UltCombo closed 9 years ago
Oh, and BrowserSync also comes with the excellent Gaze watcher bundled. Here's the BrowserSync API docs and configs.
Hey @UltCombo , it seems that is an excellent option, indeed! Can you try to make a prototype in a separated branch?
@jaydson of course. =]
I'll work on it later tonight.
Did you had time to test it? This still a great feature :)
Oh my bad, I ended up without time to test it back then. This is still a great idea, I'll probably try to implement it this weekend. I intend to finish writing the TDZ post and publish a stable slush-es6 version ASAP, then I'll have time to go through these Harmonic issues.
:+1:
I was about to propose a --no-cache
/--dev
flag to harmonic run
to aid writing articles, but then I just realized that implementing browser-sync would make such feature redundant hah.
I still have some more stuff to do around other repositories, but once I get back to Harmonic (still this weekend), browser-sync will be a top priority.
I've imported the priority labels from JSHint, by the way.
Thanks @UltCombo . The labels "good first bug" and "Proposal" are great, we can also use it.
@jaydson agreed, feel free to add them. =]
BTW, I haven't got to work on browser-sync implementation yet as I have some slightly late projects/tasks -- I said I'd help on gulp-jscs reporters about a month ago and just got to it now heh.
I believe we can deploy Harmonic 0.0.10 after implementing browser-sync, I guess this will be the main feature of the release then. It would be nice to have a changelog (#116) to know the releases' details.
Seems good to me.
I see @jaydson has been working on the
watch
branch which, as far as I can see, regenerates the whole site when files are edited.I believe it'd be optimal if we could refresh the browser after the new files are generated.
As far as I know, BrowserSync is the simplest way to achieve this. It does not require any browser plugins nor any modification to the pages.
BrowserSync has 2 operation modes: it can create a static server or proxy an existing server. In either case, it will automatically inject the necessary scripts to communicate with Node.
In our case, I believe we could replace the
node-static
dependency with BrowserSync's static server, and in watch mode we just have to addbrowserSync.reload
to the end of the site regenerating pipeline.And if we replace node-static with browser-sync, it may as well be better to have watch mode enabled by default to keep the logic simple.
Thoughts?