[i18nIgnore] Fix pnpm command typos#5284
[i18nIgnore] Fix pnpm command typos#5284sarah11918 merged 2 commits intowithastro:mainfrom mingjunlu:fix/pnpm-command-typos
Conversation
✅ Deploy Preview for astro-docs-2 ready!Built without sensitive environment variables
To edit notification comments on pull requests, go to your Netlify site configuration. |
astrobot-houston
left a comment
There was a problem hiding this comment.
Hello! Thank you for opening your first PR to Astro’s Docs! 🎉
Here’s what will happen next:
-
Our GitHub bots will run to check your changes.
If they spot any broken links you will see some error messages on this PR.
Don’t hesitate to ask any questions if you’re not sure what these mean! -
In a few minutes, you’ll be able to see a preview of your changes on Netlify 🥳
-
One or more of our maintainers will take a look and may ask you to make changes.
We try to be responsive, but don’t worry if this takes a few days.
dreyfus92
left a comment
There was a problem hiding this comment.
You're right, there is a difference between pnpm install and pnpm add when using the pnpm package manager.
So in general:
- Use
pnpm installwhen setting up a brand new project, or when you want to fully reinstall all dependencies. - Use
pnpm addwhen you just want to add a new dependency to an existing project.
The snippets likely use pnpm install because they are showing how to install a package in a generic, standalone way. But in the context of an existing project, pnpm add is preferrable for adding new packages.
Good catch on the distinction! Using the right command for the situation can save time and avoid unnecessary installs.
dreyfus92
left a comment
There was a problem hiding this comment.
Thank you for handling this @mingjunlu, I've left you a couple of suggestions let me know your thoughts.
| <Fragment slot="pnpm"> | ||
| ```shell | ||
| pnpm install astro | ||
| pnpm add astro |
There was a problem hiding this comment.
I wouldn't replace install here, since this guide is about creating a brand new project.
There was a problem hiding this comment.
Got it! Thanks for pointing it out 💡
|
|
||
| ```bash | ||
| pnpm install sharp | ||
| pnpm add sharp |
There was a problem hiding this comment.
I'm not completely sure about this one, i'd stick with a fresh re install of sharp tho.
There was a problem hiding this comment.
No problem! Let's keep the original one
|
Thanks so much @mingjunlu for helping us get the commands just right. And thank you for this excellent review, @dreyfus92 with extra context and for thoughtfully considering each individual change. Go Team! 🙌 I'm going to add the title keyword so that this PR touching multiple files doesn't affect our translation tracking status, and I'm going to apply the suggestions so this can be merged and helping people in docs right away! @mingjunlu - If you find any error in the published version of this PR, please do make another one and let us know! I do agree with @dreyfus92 's assessment that in some cases, install is preferable, and will make those changes. Thanks again, and welcome to Team Docs! 🥳 |
|
Woah! To be honest, I didn't expect to receive response that fast! 🚀 |
…mdx` (#6363) * i18n(fr) Update reading-time.mdx Just for translator tracker because the PR #5766 should have been [ignore] * Update astro-pages.mdx * Update framework-components.mdx * Update layouts.mdx * Update routing.mdx * Update editor-setup.mdx * Update configuring-astro.mdx * Update cloudflare.mdx * Update deno.mdx * Update netlify.mdx * Update vercel.mdx * Update imports.mdx * Update auto.mdx * Update manual.mdx * Update cli-reference.mdx Update and del some parts * Update cli-reference.mdx Update fiule with PR #5512 #5651 #5604 #5765 #6040 #6043 #6109 #6267 * Update auto.mdx * Update cloudflare.mdx fix PR #5284 * Update markdown-content.mdx * Update auto.mdx * Update src/content/docs/fr/core-concepts/astro-pages.mdx Co-authored-by: Paul Valladares <85648028+dreyfus92@users.noreply.github.com> * Update src/content/docs/fr/core-concepts/astro-pages.mdx Co-authored-by: Paul Valladares <85648028+dreyfus92@users.noreply.github.com> * Update src/content/docs/fr/core-concepts/astro-pages.mdx Co-authored-by: Paul Valladares <85648028+dreyfus92@users.noreply.github.com> * Update src/content/docs/fr/core-concepts/framework-components.mdx Co-authored-by: Paul Valladares <85648028+dreyfus92@users.noreply.github.com> * Update src/content/docs/fr/core-concepts/framework-components.mdx Co-authored-by: Paul Valladares <85648028+dreyfus92@users.noreply.github.com> * Update src/content/docs/fr/guides/markdown-content.mdx Co-authored-by: Paul Valladares <85648028+dreyfus92@users.noreply.github.com> * Update src/content/docs/fr/install/manual.mdx Co-authored-by: Paul Valladares <85648028+dreyfus92@users.noreply.github.com> * Update src/content/docs/fr/install/manual.mdx Co-authored-by: Paul Valladares <85648028+dreyfus92@users.noreply.github.com> * Update src/content/docs/fr/reference/cli-reference.mdx Co-authored-by: Paul Valladares <85648028+dreyfus92@users.noreply.github.com> * Apply suggestions from code review --------- Co-authored-by: Paul Valladares <85648028+dreyfus92@users.noreply.github.com>
…mdx` (#6363) * i18n(fr) Update reading-time.mdx Just for translator tracker because the PR #5766 should have been [ignore] * Update astro-pages.mdx * Update framework-components.mdx * Update layouts.mdx * Update routing.mdx * Update editor-setup.mdx * Update configuring-astro.mdx * Update cloudflare.mdx * Update deno.mdx * Update netlify.mdx * Update vercel.mdx * Update imports.mdx * Update auto.mdx * Update manual.mdx * Update cli-reference.mdx Update and del some parts * Update cli-reference.mdx Update fiule with PR #5512 #5651 #5604 #5765 #6040 #6043 #6109 #6267 * Update auto.mdx * Update cloudflare.mdx fix PR #5284 * Update markdown-content.mdx * Update auto.mdx * Update src/content/docs/fr/core-concepts/astro-pages.mdx Co-authored-by: Paul Valladares <85648028+dreyfus92@users.noreply.github.com> * Update src/content/docs/fr/core-concepts/astro-pages.mdx Co-authored-by: Paul Valladares <85648028+dreyfus92@users.noreply.github.com> * Update src/content/docs/fr/core-concepts/astro-pages.mdx Co-authored-by: Paul Valladares <85648028+dreyfus92@users.noreply.github.com> * Update src/content/docs/fr/core-concepts/framework-components.mdx Co-authored-by: Paul Valladares <85648028+dreyfus92@users.noreply.github.com> * Update src/content/docs/fr/core-concepts/framework-components.mdx Co-authored-by: Paul Valladares <85648028+dreyfus92@users.noreply.github.com> * Update src/content/docs/fr/guides/markdown-content.mdx Co-authored-by: Paul Valladares <85648028+dreyfus92@users.noreply.github.com> * Update src/content/docs/fr/install/manual.mdx Co-authored-by: Paul Valladares <85648028+dreyfus92@users.noreply.github.com> * Update src/content/docs/fr/install/manual.mdx Co-authored-by: Paul Valladares <85648028+dreyfus92@users.noreply.github.com> * Update src/content/docs/fr/reference/cli-reference.mdx Co-authored-by: Paul Valladares <85648028+dreyfus92@users.noreply.github.com> * Apply suggestions from code review --------- Co-authored-by: Paul Valladares <85648028+dreyfus92@users.noreply.github.com>
Description
I found that many package installation snippets use
pnpm install <pkg>instead ofpnpm add <pkg>.According to pnpm's documentation:
pnpm installis used for installing all dependencies for a projectpnpm add <pkg>is used for installing certain new package(s)This PR changes those to the latter ✍️
Related issues & labels