refactor(examples): group multifile scripted_demo into a folder - #71
Merged
Merged
Conversation
Move the four scripted_demo files (Rust example, Python client, script JSON, and server TOML) into examples/scripted_demo/. The Rust file becomes main.rs so Cargo still auto-discovers it as the "scripted_demo" example. Update all path references in the example sources, CI workflow, README, and docs/api.md. Remove the orphan top-level examples/package.json and package-lock.json left over from when the TypeScript example lived at the top level; the real TS example now lives in examples/node/ with its own pinned lockfile, and point the README TypeScript section there.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Reorganize
examples/so that multifile examples each live in their own folder.scripted_demofiles intoexamples/scripted_demo/:scripted_demo.rs→main.rs(so Cargo still auto-discovers it as thescripted_demoexample)scripted_demo.py,scripted_demo.json,scripted_demo.toml(names kept)examples/package.jsonandexamples/package-lock.json— leftovers from when the TypeScript example lived at the top level. The real TS example already lives inexamples/node/with its own pinned lockfile.Script::from_file, the TOMLscript_path),.github/workflows/ci.yml,examples/README.md(including pointing the TypeScript section atexamples/node/), anddocs/api.md.Why
The
scripted_demoexample is made of four files that belonged together but sat flat inexamples/, mixed in with the single-file examples. Grouping them into a folder (matching the existingexamples/node/TS example) makes the layout consistent and self-documenting, and clears out unused package files.How
git mvthe files into the new folder, rename the Rust entrypoint tomain.rsto preserve Cargo example auto-discovery, then update all path references across sources, CI, README, and docs.Risk
Checklist
cargo test: 44 passed), clippy/fmt clean,./tests/smoke_test.shpassed, and the scripted server was booted from the new config path.cargo run --example scripted_demobuilds and loads the script from the new location.cargo run --example scripted_demounchanged; only on-disk file locations moved.Generated by Claude Code