mirror of
https://github.com/carbon-design-system/carbon-components-svelte.git
synced 2025-09-22 13:13:43 +00:00
build: separate sveld into a separate build script
This commit is contained in:
parent
1aa6e0c110
commit
28fd09f0c9
3 changed files with 21 additions and 19 deletions
20
scripts/build-docs.js
Normal file
20
scripts/build-docs.js
Normal file
|
@ -0,0 +1,20 @@
|
|||
const { sveld } = require("sveld");
|
||||
const pkg = require("../package.json");
|
||||
|
||||
sveld({
|
||||
glob: true,
|
||||
markdown: true,
|
||||
markdownOptions: {
|
||||
onAppend: (type, document, components) => {
|
||||
if (type === "h1")
|
||||
document.append(
|
||||
"quote",
|
||||
`${components.size} components exported from ${pkg.name}@${pkg.version}.`
|
||||
);
|
||||
},
|
||||
},
|
||||
json: true,
|
||||
jsonOptions: {
|
||||
outFile: "docs/src/COMPONENT_API.json",
|
||||
},
|
||||
});
|
Loading…
Add table
Add a link
Reference in a new issue