Hello Firefox front-end developers!
Long before Austin, Brian Grinstead and I did some work on improving the Firefox front-end developer workflow. We started with a lightweight filesystem watcher called |mach watch| to incrementally run |mach build faster|.
The first bits of that work landed [1] [2] but there were some issues around purging startup caches [3] [4] that prevented us publicizing it widely. I think I've addressed those issues now, so we're ready for wider usage!
Bare-bones instructions are at
Basically, run |mach watch| in one terminal, run |mach run| in
another, and use the Quick Restart hot-key to test your editor changes
quickly.
I'm currently working on incorporating |mach watch| into |mach run| and adding a Web Socket server to |mach watch| [5]. That will let us immediately refresh browser CSS in a running browser, and also allow us to reload in-content pages like about: pages. This functionality will mimic the webpack watcher (but does not use any of the same implementation, sadly).
After that, the sky is the limit: anything you might like to do with a bidirectional communication channel between the build system and development environment, and the browser under development, could be possible.
Thanks to Brian for browser integration, and to Dave Townsend and Myk Melez for helpful conversations; to many in the Firefox front-end team and devtools team for early feedback; and to Greg Szorc for reviewing build system patches.
Best,
Nick