refactor(build): nest static-site generator under cook build web#348
Conversation
Restructures the `cook build` command as a parent that dispatches to named subcommands, with `web` as the first (and currently only) target. This carves out room for future build outputs (e.g. printable cookbooks) without further reshaping the CLI surface. Breaking change: `cook build` invocations must now specify the target, e.g. `cook build web` instead of `cook build`.
Code Review:
|
| Area | Status |
|---|---|
| Correctness | ✅ Clean dispatch, no logic changes |
| Conventions | ✅ Matches existing command/module patterns |
| Docs | ✅ README and docs/build.md updated |
| Tests | ✅ All 14 tests updated; one edge case worth adding |
| Security | ✅ No concerns |
| Breaking change | ✅ Documented; intentional and appropriate |
The get_base_path() point is the only thing worth resolving before merge — everything else is minor. Overall a well-scoped, clean refactor.
Code Review:
|
Summary
cook buildas a parent command dispatching to named subcommands; introducecook build webfor the existing static-site generator.README.md,docs/build.md) and integration tests to the new invocation.Breaking change:
cook build ...invocations must now specify the target, e.g.cook build webinstead ofcook build.Test plan
cargo fmt --checkcargo clippy --all-targets(clean)cargo test --test build(14/14 pass)cook build --helpshows the newwebsubcommandcook build web --helpshows the original options (output dir,--base-path,--base-url,--lang)