@kubb/parser-md 5.0.0-beta.26 → 5.0.0-beta.27
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/extension.yaml +22 -4
- package/package.json +2 -2
package/extension.yaml
CHANGED
|
@@ -27,11 +27,29 @@ resources:
|
|
|
27
27
|
changelog: https://github.com/kubb-labs/kubb/blob/main/packages/parser-md/CHANGELOG.md
|
|
28
28
|
featured: false
|
|
29
29
|
intro: |-
|
|
30
|
-
`@kubb/parser-md`
|
|
30
|
+
`@kubb/parser-md` lets Kubb emit `.md` and `.markdown` files. Register it alongside `parserTs` and any plugin that writes a markdown source will have its output serialized automatically.
|
|
31
31
|
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
32
|
+
The parser joins source blocks with blank lines. When `file.meta.frontmatter` is set, it prepends the YAML envelope — no separate `yaml` dependency needed. Pair it with `parserTs` when a generator emits both TypeScript and documentation files side by side.
|
|
33
|
+
options:
|
|
34
|
+
- name: frontmatter
|
|
35
|
+
type: 'Record<string, unknown> | null'
|
|
36
|
+
required: false
|
|
37
|
+
default: 'undefined'
|
|
38
|
+
description: |-
|
|
39
|
+
Set `frontmatter` on `file.meta` inside a plugin to have the parser prepend a YAML frontmatter block. Any serializable key-value object works.
|
|
40
|
+
codeBlock:
|
|
41
|
+
lang: typescript
|
|
42
|
+
title: plugin example
|
|
43
|
+
twoslash: false
|
|
44
|
+
code: |-
|
|
45
|
+
createFile({
|
|
46
|
+
baseName: 'README.md',
|
|
47
|
+
path: `${config.output.path}/README.md`,
|
|
48
|
+
meta: {
|
|
49
|
+
frontmatter: { title: 'API Reference', layout: 'doc' },
|
|
50
|
+
},
|
|
51
|
+
sources: [...],
|
|
52
|
+
})
|
|
35
53
|
examples:
|
|
36
54
|
- name: Standalone markdown
|
|
37
55
|
files:
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kubb/parser-md",
|
|
3
|
-
"version": "5.0.0-beta.
|
|
3
|
+
"version": "5.0.0-beta.27",
|
|
4
4
|
"description": "Markdown source file parser for Kubb. Converts the universal AST to `.md` source and renders YAML frontmatter via the `print` helper.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"codegen",
|
|
@@ -43,7 +43,7 @@
|
|
|
43
43
|
},
|
|
44
44
|
"dependencies": {
|
|
45
45
|
"yaml": "^2.9.0",
|
|
46
|
-
"@kubb/core": "5.0.0-beta.
|
|
46
|
+
"@kubb/core": "5.0.0-beta.27"
|
|
47
47
|
},
|
|
48
48
|
"devDependencies": {
|
|
49
49
|
"@internals/utils": "0.0.0"
|