-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[i18nIgnore] Fix pnpm command typos #5284
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. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You're right, there is a difference between pnpm install
and pnpm add
when using the pnpm package manager.
So in general:
- Use
pnpm install
when setting up a brand new project, or when you want to fully reinstall all dependencies. - Use
pnpm add
when 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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for handling this @mingjunlu, I've left you a couple of suggestions let me know your thoughts.
@@ -71,7 +71,7 @@ Astro must be installed locally, not globally. Make sure you are *not* running ` | |||
</Fragment> | |||
<Fragment slot="pnpm"> | |||
```shell | |||
pnpm install astro | |||
pnpm add astro |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I wouldn't replace install here, since this guide is about creating a brand new project.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Got it! Thanks for pointing it out 💡
@@ -656,7 +656,7 @@ If the image is merely decorative (i.e. doesn’t contribute to the understandin | |||
When using a [strict package manager](https://pnpm.io/pnpm-vs-npm#npms-flat-tree) like `pnpm`, you may need to manually install Sharp into your project even though it is an Astro dependency: | |||
|
|||
```bash | |||
pnpm install sharp | |||
pnpm add sharp |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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! 🚀 |
Update translation with #5284 and #5363 L39 &78 Co-authored-by: Yan Thomas <[email protected]>
…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 <[email protected]> * Update src/content/docs/fr/core-concepts/astro-pages.mdx Co-authored-by: Paul Valladares <[email protected]> * Update src/content/docs/fr/core-concepts/astro-pages.mdx Co-authored-by: Paul Valladares <[email protected]> * Update src/content/docs/fr/core-concepts/framework-components.mdx Co-authored-by: Paul Valladares <[email protected]> * Update src/content/docs/fr/core-concepts/framework-components.mdx Co-authored-by: Paul Valladares <[email protected]> * Update src/content/docs/fr/guides/markdown-content.mdx Co-authored-by: Paul Valladares <[email protected]> * Update src/content/docs/fr/install/manual.mdx Co-authored-by: Paul Valladares <[email protected]> * Update src/content/docs/fr/install/manual.mdx Co-authored-by: Paul Valladares <[email protected]> * Update src/content/docs/fr/reference/cli-reference.mdx Co-authored-by: Paul Valladares <[email protected]> * Apply suggestions from code review --------- Co-authored-by: Paul Valladares <[email protected]>
…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 <[email protected]> * Update src/content/docs/fr/core-concepts/astro-pages.mdx Co-authored-by: Paul Valladares <[email protected]> * Update src/content/docs/fr/core-concepts/astro-pages.mdx Co-authored-by: Paul Valladares <[email protected]> * Update src/content/docs/fr/core-concepts/framework-components.mdx Co-authored-by: Paul Valladares <[email protected]> * Update src/content/docs/fr/core-concepts/framework-components.mdx Co-authored-by: Paul Valladares <[email protected]> * Update src/content/docs/fr/guides/markdown-content.mdx Co-authored-by: Paul Valladares <[email protected]> * Update src/content/docs/fr/install/manual.mdx Co-authored-by: Paul Valladares <[email protected]> * Update src/content/docs/fr/install/manual.mdx Co-authored-by: Paul Valladares <[email protected]> * Update src/content/docs/fr/reference/cli-reference.mdx Co-authored-by: Paul Valladares <[email protected]> * Apply suggestions from code review --------- Co-authored-by: Paul Valladares <[email protected]>
Description
I found that many package installation snippets use
pnpm install <pkg>
instead ofpnpm add <pkg>
.According to pnpm's documentation:
pnpm install
is 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