refactor(editor): extract README generators into cli_readmes.cpp

Continues the modularization. Moves --gen-zone-readme and
--gen-project-readme into their own translation unit using the
established handle<Family> dispatch pattern. Consolidated the
trailing --out flag parser into a single parseOutFlag helper
(was duplicated between the two handlers).

main.cpp drops 27,736 → 27,445 lines (-291). Behavior unchanged
(verified by re-generating README and PROJECT.md, contents
identical to pre-refactor output).
This commit is contained in:
Kelsi 2026-05-08 17:36:10 -07:00
parent ac17d04f8c
commit a39f4e9b43
4 changed files with 354 additions and 295 deletions

View file

@ -0,0 +1,16 @@
#pragma once
namespace wowee {
namespace editor {
namespace cli {
// Dispatch the two README auto-generators:
// --gen-zone-readme -> README.md inside a zone
// --gen-project-readme -> PROJECT.md at a project root
//
// Returns true if matched; outRc holds the exit code.
bool handleReadmes(int& i, int argc, char** argv, int& outRc);
} // namespace cli
} // namespace editor
} // namespace wowee