Skip to content

Commit

Permalink
docs: Add pnpm install instructions
Browse files Browse the repository at this point in the history
  • Loading branch information
ntucker committed Aug 12, 2024
1 parent 8cc8b18 commit d2898c6
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 0 deletions.
7 changes: 7 additions & 0 deletions website/src/components/PkgInstall.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,13 @@ export default function PkgInstall({ pkgs, dev = false, global }) {
{pkgs}
</CodeBlock>
);
} else if (relevantTabGroupChoice === 'pnmp') {
return (
<CodeBlock className="language-bash">
pnpm add{global ? ' -g' : ''}
{dev ? ' -D' : ''} {pkgs}
</CodeBlock>
);
}
return (
<CodeBlock className="language-bash">
Expand Down
6 changes: 6 additions & 0 deletions website/src/components/PkgTabs.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ export default function PkgTabs({ pkgs, dev = false }) {
values={[
{ label: 'NPM', value: 'npm' },
{ label: 'Yarn', value: 'yarn' },
{ label: 'pnpm', value: 'pnpm' },
{ label: 'esm.sh', value: 'esm' },
]}
>
Expand All @@ -25,6 +26,11 @@ export default function PkgTabs({ pkgs, dev = false }) {
npm install --save{dev ? 'Dev ' : ''} {pkgs}
</CodeBlock>
</TabItem>
<TabItem value="pnpm">
<CodeBlock className="language-bash">
pnpm add{dev ? ' -D' : ''} {pkgs}
</CodeBlock>
</TabItem>
<TabItem value="esm">
<CodeBlock className="language-html">
{`<script type="module">
Expand Down

0 comments on commit d2898c6

Please sign in to comment.