Skip to content

fix(cli): build asks before scaffolding a config - #27

Merged
losolio merged 1 commit into
mainfrom
fix/build-config-consent
Jul 25, 2026
Merged

fix(cli): build asks before scaffolding a config#27
losolio merged 1 commit into
mainfrom
fix/build-config-consent

Conversation

@losolio

@losolio losolio commented Jul 25, 2026

Copy link
Copy Markdown
Contributor

What

lectio build no longer writes a docs.config.ts on its own when none exists:

  • interactive — it prompts Create a starter docs.config.ts? [y/N]
  • CI / non-TTY — it errors with guidance, never mutating the repo silently

lectio dev still auto-scaffolds — it's the try-it-out on-ramp.

Why

A build (often in CI) silently writing a config and building **/*.md across
the whole tree is surprising and can produce a wrong site. Consent-first keeps
build deterministic.

Note

This refines the still-unpublished lectio dev feature (#25, releasing as 0.2.0
via the pending version PR #26) and updates its changeset text — so 0.2.0 ships
with the corrected behavior and an accurate changelog.

Verified

  • build no config, non-TTY → errors, writes nothing
  • build with config → unchanged
  • dev no config → auto-scaffolds + serves

… silently

`lectio build` no longer writes a docs.config.ts on its own when none exists —
it prompts when interactive and errors in CI, so a build never mutates the repo
by surprise. `lectio dev` still auto-scaffolds, as the try-it-out on-ramp.

Refines the still-unpublished lectio dev feature (updates its changeset).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings July 25, 2026 17:22

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Updates the lectio CLI so that build no longer silently scaffolds docs.config.ts when missing, making CI/non-interactive builds deterministic while preserving dev as a zero-config on-ramp. Also updates the 0.2.0 changeset text to match the refined behavior.

Changes:

  • Make lectio dev continue to auto-scaffold docs.config.ts when missing.
  • Make lectio build prompt before scaffolding in interactive sessions and error in non-TTY/CI.
  • Update the changeset description to reflect the new build behavior.

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 interactive prompting/error behavior for missing config in build, while keeping dev auto-scaffolding.
.changeset/lectio-dev.md Updates release notes to accurately describe the refined scaffolding behavior.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@losolio
losolio merged commit 0257406 into main Jul 25, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants