Statiq.Web
Statiq.Web copied to clipboard
Hotkeys in --watch mode
The --watch
command is great for automatically rebuilding the site (and doing so faster than a full rebuild), but with issues like https://github.com/Wyamio/Wyam/issues/817 it can be annoying to not have any manual control over it so I was wondering if it would be possible to have it listen for keyboard input?
This could allow a couple of manual controls:
-
R
- force rebuild -
D
- stop watching for a bit -
O
- open the preview page in the default web browser
I love this idea
I just made a new site and noticed a massive hit to generation time as soon as I pointed it to my project to generate the API pages, so that could also be worth making a hotkey to disable. Just keeping all the old API pages would be ideal, but if that's tricky to implement then simply not having any API pages until you need to do a final build would be fine.
I've started working on one of my larger projects again and did a quick comparison of the generation times:
- With code: 26 seconds initially, then 12 seconds whenever a watched file changes.
- Without code: 13 seconds initially, then 3 seconds whenever a watched file changes.
There’s a totally new caching approach in v3 and early indications are that it’ll drastically speed up rebuilds for both API generation and non-API use cases. There may also be some wins in that initial 26 seconds, but a lot of that is probably due to MSBuild and/or Roslyn which we can’t get out of. What we can do is run those operations concurrently with other things to speed up overall generation and that’s another thing v3 does.
Awesome, I'm really looking forward to it.