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:
Eric Liu 2022-01-24 14:16:31 -08:00 committed by GitHub
commit e37b632fef
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 77 additions and 76 deletions

View file

@ -121,23 +121,15 @@ export {
} from "./ComposedModal";
```
### Build
### Run `yarn build:docs`
Verify that you can build the library by running the following command at the project root:
Run the following command to re-generate TypeScript definitions and documentation.
```sh
# carbon-components-svelte/
yarn prepack
yarn build:docs
```
This does several things:
- uses `node-sass` to pre-compile CSS StyleSheets in the `css` folder
- uses Rollup to bundle the Svelte components in `src` in ESM/UMD formats; emitted to `lib`
- uses a Rollup plugin to:
- generate component documentation in Markdown format (`COMPONENT_INDEX.md`)
- generate TypeScript definitions (`types/index.d.ts`)
## Submit a Pull Request
### Sync Your Fork