feat(cli): add lectio dev and zero-config scaffolding - #25
Merged
Conversation
`lectio dev` materializes the site app and runs `react-router dev` (a local dev server with HMR on the UI); content is collected once at startup. When no docs.config exists, both dev and build scaffold a starter docs.config.ts (`**/*.md`, .ts not .mjs) and run with it, so a fresh repo shows a demo immediately. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
There was a problem hiding this comment.
Pull request overview
This PR extends the lectio CLI with a new dev subcommand and introduces “zero-config” behavior that scaffolds a starter docs config when none is present, enabling an immediate demo experience in a fresh repository.
Changes:
- Add
lectio dev, which materializes the site app and runsreact-router devfor local development with HMR. - Implement zero-config scaffolding: when no
docs.config.*exists, write a starterdocs.configand proceed with collect/build/dev. - Update CLI help/docs/comments and add a changeset for a minor release.
Reviewed changes
Copilot reviewed 1 out of 2 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| apps/site-builder/bin/lectio.mjs | Adds dev command, zero-config scaffolding, and routes to react-router dev vs react-router build. |
| .changeset/lectio-dev.md | Declares a minor release and documents the new dev + scaffolding behavior. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
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
Adds
lectio devand zero-config scaffolding to the CLI.lectio dev— materializes the site app and runsreact-router dev: alocal dev server with HMR on the app UI. Content is collected once at startup.
docs.configexists, bothdevandbuildscaffold a starter
docs.config.ts(**/*.md,.tsnot.mjs) and run withit, so a fresh repo shows a demo immediately.
Verified
lectio buildunchanged (regression:examples/quickstartstill builds)devin a fresh repo: scaffoldsdocs.config.ts, collects, servesat
:5173, route-aware (/docs,/docs/guide→ 200)Notes
**/*.mdmirrors the tree (docs/index.md→/docs); no/home unless aroot
index.mdexists. The scaffolded config is a starting point to edit.README.mdgets a/.slug under**/*.md— leftas-is for now.
devrun; a--watchfor markdown is a naturalfollow-up.