Skip to content
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

Merged
merged 3 commits into from
Apr 21, 2022

Conversation

bholmesdev
Copy link
Contributor

@bholmesdev bholmesdev commented Apr 20, 2022

What changed

  • Replace all uses of npm init astro with npm create astro@latest
  • Add pnpm create and yarn create instructions where applicable
  • Update "npm" and "pnpm" to be all lowercase where applicable

Motivation

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 of npm init astro with npm create astro@latest across the docs.

Why create instead of init? You can run yarn create and pnpm create, but the same isn't true for "init." This should help with having consistent instructions across package managers.

@netlify
Copy link

netlify bot commented Apr 20, 2022

Deploy Preview for astro-docs-2 ready!

Name Link
🔨 Latest commit 7ffbbcf
🔍 Latest deploy log https://app.netlify.com/sites/astro-docs-2/deploys/62608b069368c6000855c19f
😎 Deploy Preview https://deploy-preview-360--astro-docs-2.netlify.app/de/installation
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site settings.

@bholmesdev bholmesdev force-pushed the edit/update-create-astro-instructions branch from 10e98f5 to 416980b Compare April 20, 2022 22:35
Comment on lines -22 to -29
# Mit NPM
npm init astro
# Mit npm
npm create astro@latest

# Yarn
# yarn
yarn create astro

# Pnpm
pnpm create astro
Copy link
Contributor Author

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 $_
Copy link
Contributor Author

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!

@sarah11918
Copy link
Member

45 files changed... 😅
LGTM!

@bholmesdev bholmesdev merged commit 083a6bc into main Apr 21, 2022
@bholmesdev bholmesdev deleted the edit/update-create-astro-instructions branch April 21, 2022 14:53
mrienstra pushed a commit to mrienstra/astro that referenced this pull request Sep 14, 2022
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.
natemoo-re pushed a commit to withastro/astro that referenced this pull request Sep 16, 2022
* .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>
natemoo-re pushed a commit to natemoo-re/astro-template-minimal that referenced this pull request Sep 30, 2022
* .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>
mimed95 pushed a commit to mimed95/mimed95.github.io that referenced this pull request Apr 5, 2024
* .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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants