mirror of
https://github.com/facebook/docusaurus.git
synced 2025-06-06 04:42:40 +02:00
feat(npm-to-yarn): add support for PnPm and custom converters (#8690)
Co-authored-by: Ben Gubler <nebrelbug@gmail.com> Co-authored-by: sebastienlorber <lorber.sebastien@gmail.com>
This commit is contained in:
parent
17781fd5d3
commit
fabf053def
11 changed files with 411 additions and 66 deletions
|
@ -772,6 +772,14 @@ module.exports = {
|
|||
remarkPlugins: [require('@docusaurus/remark-plugin-npm2yarn')],
|
||||
},
|
||||
blog: {
|
||||
// highlight-start
|
||||
remarkPlugins: [
|
||||
[
|
||||
require('@docusaurus/remark-plugin-npm2yarn'),
|
||||
{converters: ['pnpm']},
|
||||
],
|
||||
],
|
||||
// highlight-end
|
||||
// ...
|
||||
},
|
||||
},
|
||||
|
@ -788,7 +796,12 @@ npm install @docusaurus/remark-plugin-npm2yarn
|
|||
```
|
||||
````
|
||||
|
||||
Using the `{sync: true}` option would make all tab choices synced. Because the choice is stored under the same namespace `npm2yarn`, different `npm2yarn` plugin instances would also sync their choices.
|
||||
#### Configuration {#npm2yarn-remark-plugin-configuration}
|
||||
|
||||
| Option | Type | Default | Description |
|
||||
| --- | --- | --- | --- |
|
||||
| `sync` | `boolean` | `false` | Whether to sync the selected converter across all code blocks. |
|
||||
| `converters` | `array` | `'yarn'`, `'pnpm'` | The list of converters to use. The order of the converters is important, as the first converter will be used as the default choice. |
|
||||
|
||||
## Usage in JSX {#usage-in-jsx}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue