statiqdev / Statiq.Web

Statiq Web is a flexible static site generator written in .NET.
https://statiq.dev/web
Other
1.65k stars 235 forks source link

Hotkeys in --watch mode #826

Open SilentSin opened 5 years ago

SilentSin commented 5 years ago

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:

daveaglick commented 5 years ago

I love this idea

SilentSin commented 5 years ago

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.

SilentSin commented 5 years ago

I've started working on one of my larger projects again and did a quick comparison of the generation times:

daveaglick commented 5 years ago

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.

SilentSin commented 5 years ago

Awesome, I'm really looking forward to it.