Files
raea/tools/manual-ref.sh
shinyobjectz 668ae2eb08 Docs: every SDK prop, field and member described on raea.io/docs, and the reference check fails on a missing one
The SDK reference's tables had 1,476 empty cells. Each prop, field and class member the pages table now has a doc
comment in its source, or Bevy's own field doc where the SDK mirrors a Bevy type:

- doc comments on 773 declarations across 84 SDK files (song maps, goo and rigid bodies, matchmove, the clock and
  timeline, state machines, materials and their extensions, the 2D shapes, bevy_ui and feathers wrappers, colours)
- inline prop types pulled out as named, documented interfaces (EchoesProps, DaylightProps, UiScaleProps, ...), so
  each prop can carry its own doc
- types raea-bevy-sdk generates from raea's crates (/** raea_core_animate::spec::AnimKey */) take their field docs
  from the Rust source, shown as raea's ("Rust: ..."), not Bevy's; core/animate's spec.rs gains the missing ///
- a props type (StandardMaterialProps) takes its component's @bevy fields; the colour classes gain their @bevy tags
- tools/manual-ref/sdk.ts check now fails on any prop, field or member without a description, as cli.ts does for
  flags; tools/manual-ref.sh links an export's node_modules (RAEA_MODULES) so it can run in L1's lane export
2026-11-08 20:18:08 -08:00

23 lines
1.1 KiB
Bash
Executable File

#!/usr/bin/env bash
# The manual's generated references (raea.io/docs/reference/cli/ and /sdk/): `gen` rewrites their generated blocks,
# `check` fails when one is out of date, a flag, prop, field or member has no description, or a verb or import path is
# in no group.
# tools/manual-ref.sh gen|check (RAEA_BIN names the raea whose `help --json` the CLI pages come from;
# RAEA_MODULES the checkout whose node_modules an export without them uses)
set -euo pipefail
cd "$(dirname "$0")/.."
root=$PWD
mode="${1:-check}"
mods=${RAEA_MODULES:-$root}
if [ "$mods" != "$root" ]; then
# an export (tools/agents/check --lane): the SDK's imports resolve through the checkout's node_modules, linked in
# where missing, as tools/context-examples.sh links them
for m in "$mods"/sdk/*/node_modules; do
d=$root/${m#"$mods"/}
[ -d "$(dirname "$d")" ] || continue # a package the export hasn't got (a private one)
[ -e "$d" ] || { rm -f "$d"; ln -s "$m" "$d"; }
done
fi
bun tools/manual-ref/cli.ts "$mode"
bun tools/manual-ref/sdk.ts "$mode"