Repository navigation
docs: explain the source-first workflow and compare with snippet checkers (#2) - #49
Merged
Merged
Conversation
|
The changes in this PR will be included in the next version bump.
|
|
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.


Closes #2.
Summary
The READMEs now say that examples live in source or test files, your own lint and tests check them there, and
mdcode updatecopies them into Markdown. The package README's "Why Use mdcode?" used to lead with the Markdown-first flow ("Write examples once in your README"), which is the confusion the issue describes.The comparison only describes what Kiira says it does: it extracts TS/JS fences from Markdown and MDX, type-checks them against the project, and reports errors on the fence line in the editor, the CLI and CI. It also points out that
validate-snippets.mjscan run your owntsconrunnable=trueblocks, so the docs don't claim mdcode can't check Markdown-authored code at all.I dropped
file=tests/examples/base-1.shfrom the "Keep Examples Fresh" block I rewrote. That file has never existed, andmdcode update --checkreports it as missing onmaintoo. I left the otherfile=block-Nblocks alone.Evidence
The quick start and the new CI snippet, run against a temp project built from the README's
src/greet.ts:mdcode liststill parses both READMEs (8 and 109 blocks).pnpm checkpasses, includingdocs.test.ts.Merge Danger
Door: two-way
Blast Radius: docs
README text only. No CLI or library behaviour changes.