Timvir comes with a command line tool that eases creation of new React components, pages, and other general maintenance of the files used by the timvir integration.
Run the commands with npx @timvir/cli <command>
.
This command will ask you a few questions about what component you want to create, and will then generate
a few files inside the src/components/
folder. It will also update the table of contents such that the
new component appears in the navigation tree.
Use this command after you manually edit the toc.timvir
files to regenerate the table of contents JavaScript module (src/timvir/toc.ts
).
This command creates symlinks in src/pages/docs/components which point to the component documentation and sample files.
This commands generates an MDX file which describes the component API for each of your components. The file
is written into src/components/*/docs/api.mdx
.