Skip to content

[Feature] Add Remark plugin npm2yarn #1975

@cpAdm

Description

@cpAdm

In many places in the docs we have the following source code:

<Tabs
  groupId="js-package-manager"
  defaultValue="npm"
  values={[
    {label: 'npm', value: 'npm'},
    {label: 'yarn', value: 'yarn'},
    {label: 'pnpm', value: 'pnpm'}
  ]
}>
<TabItem value="npm">

\```bash
npx playwright codegen playwright.dev
\```

</TabItem>

<TabItem value="yarn">

\```bash
yarn playwright codegen playwright.dev
\```

</TabItem>

<TabItem value="pnpm">

\```bash
pnpm exec playwright codegen playwright.dev
\```

</TabItem>

</Tabs>

This can be reduced to:

\```bash npm2yarn
npx playwright codegen playwright.dev
\```

Some places only mention npm commands, with this approach these commands can easily be rewritten. Also, if bun gets supported its very easy to add the new tab once, in the config.

See documentation: https://docusaurus.io/docs/markdown-features/code-blocks#npm2yarn-remark-plugin

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions