mirror of
https://github.com/carbon-design-system/carbon-components-svelte.git
synced 2025-09-14 18:01:06 +00:00
build: decouple typegen/docgen from yarn build:lib
(#1038)
* chore(deps-dev): upgrade sveld to v0.13.1 * build: separate sveld into a separate build script * docs(contributing): update guideline on re-building docs
This commit is contained in:
parent
fd040b3b66
commit
e37b632fef
5 changed files with 77 additions and 76 deletions
|
@ -3,7 +3,6 @@ import pkg from "./package.json";
|
|||
import resolve from "@rollup/plugin-node-resolve";
|
||||
import commonjs from "@rollup/plugin-commonjs";
|
||||
import svelte from "rollup-plugin-svelte";
|
||||
import sveld from "sveld";
|
||||
|
||||
export default ["es", "umd"].map((format) => {
|
||||
const UMD = format === "umd";
|
||||
|
@ -23,24 +22,6 @@ export default ["es", "umd"].map((format) => {
|
|||
resolve(),
|
||||
commonjs(),
|
||||
UMD && terser(),
|
||||
UMD &&
|
||||
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