Skip to content

Commit 9dbc983

Browse files
feat: npm command shorthand contributing docs (#2612)
1 parent e25ff93 commit 9dbc983

File tree

1 file changed

+33
-0
lines changed

1 file changed

+33
-0
lines changed

CONTRIBUTING.md

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -717,6 +717,39 @@ pnpm add @clerk/nextjs
717717
</CodeBlockTabs>
718718
````
719719

720+
#### npm commands
721+
722+
npm codeblocks will automatically generate the commands for `pnpm`, `yarn`, and `bun` within a `<CodeBlockTabs />`.
723+
724+
````mdx
725+
```npm
726+
npm i @clerk/nextjs
727+
```
728+
````
729+
730+
Example output:
731+
732+
````mdx
733+
<CodeBlockTabs options={["npm", "pnpm", "yarn", "bun"]}>
734+
```bash {{ filename: 'terminal' }}
735+
npm i @clerk/nextjs
736+
```
737+
738+
```bash {{ filename: 'terminal' }}
739+
pnpm add @clerk/nextjs
740+
```
741+
742+
```bash {{ filename: 'terminal' }}
743+
yarn add @clerk/nextjs
744+
```
745+
746+
```bash {{ filename: 'terminal' }}
747+
bunx add @clerk/nextjs
748+
```
749+
750+
</CodeBlockTabs>
751+
````
752+
720753
The image below shows what this example looks like once rendered.
721754

722755
![An example of a <CodeBlockTabs /> component with three tabs options for 'npm', 'yarn', and 'pnpm'. Each tab shows a code example of how to install the @clerk/nextjs package.](/.github/media/code-block-tabs.png)

0 commit comments

Comments
 (0)