-
-
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
Update npm init astro
instructions to npm create astro@latest
#360
Conversation
✅ Deploy Preview for astro-docs-2 ready!
To edit notification comments on pull requests, go to your Netlify site settings. |
10e98f5
to
416980b
Compare
# Mit NPM | ||
npm init astro | ||
# Mit npm | ||
npm create astro@latest | ||
|
||
# Yarn | ||
# yarn | ||
yarn create astro | ||
|
||
# Pnpm | ||
pnpm create 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.
npm and pnpm prefer to be all lowercase. Changed yarn's casing for consistency as well
@@ -433,19 +433,19 @@ If you don't have an existing Astro site, you can create one by running: | |||
|
|||
```bash | |||
# Make a new project directory, and navigate directly into it | |||
$ mkdir my-astro-project && cd $_ |
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.
Remove $ for better copy-paste-ability!
45 files changed... 😅 |
For consistency with withastro/docs#360. Docs always use `npm create astro` (never `npm init astro`), README.md files in this repo should do the same. Search: `\b(npm|yarn|pnpm) init astro\b` Replace: `$1 create astro` Except for two instances: 1. `packages/create-astro/CHANGELOG.md` -- skipped because changelog. 2. `packages/create-astro/test/create-astro.test.js.skipped` -- skipped, old test disabled in withastro#3168.
* .md only: npm init astro --> npm create astro For consistency with withastro/docs#360. Docs always use `npm create astro` (never `npm init astro`), README.md files in this repo should do the same. Search: `\b(npm|yarn|pnpm) init astro\b` Replace: `$1 create astro` Except for two instances: 1. `packages/create-astro/CHANGELOG.md` -- skipped because changelog. 2. `packages/create-astro/test/create-astro.test.js.skipped` -- skipped, old test disabled in #3168. * docs: add `@latest` to `npm create astro` Co-authored-by: Bjorn Lu <bjorn@bjornlu.com> Co-authored-by: Michael Rienstra <michael@goodmoney.com>
* .md only: npm init astro --> npm create astro For consistency with withastro/docs#360. Docs always use `npm create astro` (never `npm init astro`), README.md files in this repo should do the same. Search: `\b(npm|yarn|pnpm) init astro\b` Replace: `$1 create astro` Except for two instances: 1. `packages/create-astro/CHANGELOG.md` -- skipped because changelog. 2. `packages/create-astro/test/create-astro.test.js.skipped` -- skipped, old test disabled in withastro/astro#3168. * docs: add `@latest` to `npm create astro` Co-authored-by: Bjorn Lu <bjorn@bjornlu.com> Co-authored-by: Michael Rienstra <michael@goodmoney.com>
* .md only: npm init astro --> npm create astro For consistency with withastro/docs#360. Docs always use `npm create astro` (never `npm init astro`), README.md files in this repo should do the same. Search: `\b(npm|yarn|pnpm) init astro\b` Replace: `$1 create astro` Except for two instances: 1. `packages/create-astro/CHANGELOG.md` -- skipped because changelog. 2. `packages/create-astro/test/create-astro.test.js.skipped` -- skipped, old test disabled in withastro/astro#3168. * docs: add `@latest` to `npm create astro` Co-authored-by: Bjorn Lu <bjorn@bjornlu.com> Co-authored-by: Michael Rienstra <michael@goodmoney.com>
What changed
npm init astro
withnpm create astro@latest
pnpm create
andyarn create
instructions where applicableMotivation
Users were getting cached versions of
create-astro
when running without the@latest
flag. Using Vite's docs as a guide, we're replacing all uses ofnpm init astro
withnpm create astro@latest
across the docs.Why
create
instead ofinit
? You can runyarn create
andpnpm create
, but the same isn't true for "init." This should help with having consistent instructions across package managers.