mirror of
https://github.com/facebook/docusaurus.git
synced 2025-06-06 04:42:40 +02:00
docs(v2): fix npm/yarn command example for swizzling TypeScript theme components (#4230)
This commit is contained in:
parent
bb63e093f1
commit
cf080c72ba
1 changed files with 1 additions and 1 deletions
|
@ -29,7 +29,7 @@ Now you can start writing TypeScript theme components.
|
|||
For themes that supports TypeScript theme components, you can add the `--typescript` flag to the end of swizzling command to get TypeScript source code. For example, the following command will generate `index.tsx` and `styles.module.css` into `src/theme/Footer`.
|
||||
|
||||
```bash npm2yarn
|
||||
npm run swizzle @docusaurus/theme-classic Footer --typescript
|
||||
npm run swizzle @docusaurus/theme-classic Footer -- --typescript
|
||||
```
|
||||
|
||||
At this moment, the only official Docusaurus theme that supports TypeScript theme components is `@docusaurus/theme-classic`. If you are a Docusaurus theme package author who wants to add TypeScript support, see the [Lifecycle APIs docs](./lifecycle-apis.md#gettypescriptthemepath).
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue