Cut the first complete thread through both layers with the smallest set
of node types.
@kitchen-md/core gains a pure, total `parse` returning a
`DocumentAST` of `{ frontmatter, blocks, diagnostics }`, built from a
minimal remark pipeline (remark-parse + remark-frontmatter) with an
internal translation layer to core's own types. This slice models
frontmatter passthrough, HeadingBlock, ParagraphBlock, and TextNode;
remark's mdast does not surface in the public API.
@kitchen-md/bin gains the `view` subcommand (commander) that reads a
file, calls `parse`, and passes the AST to a pure `render` that returns
an ANSI-styled string via chalk (auto-suppressed off a TTY). Frontmatter
prints as raw YAML followed by a separator, headings styled distinctly
by level, paragraphs as prose. A missing argument prints usage and a
missing/unreadable file a human-readable error, both exiting 1.
Richer blocks/inline plus raw fallbacks are task 0004; malformed
frontmatter diagnostics and the basic.md smoke test are task 0007.
20 lines
389 B
JSON
20 lines
389 B
JSON
{
|
|
"name": "@kitchen-md/bin",
|
|
"version": "0.0.0",
|
|
"private": true,
|
|
"type": "module",
|
|
"bin": {
|
|
"kitchen": "./src/index.ts"
|
|
},
|
|
"scripts": {
|
|
"test": "bun test",
|
|
"build": "bun build --compile ./src/index.ts --outfile kitchen"
|
|
},
|
|
"dependencies": {
|
|
"@kitchen-md/core": "workspace:*",
|
|
"chalk": "^5.6.2",
|
|
"commander": "^15.0.0",
|
|
"yaml": "^2.9.0"
|
|
}
|
|
}
|