.md only: npm init astro --> npm create astro (#4760)

* .md only: npm init astro --> npm create astro

For consistency with https://github.com/withastro/docs/pull/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 https://github.com/withastro/astro/pull/3168.

* docs: add `@latest` to `npm create astro`
Co-authored-by: Bjorn Lu <bjorn@bjornlu.com>

Co-authored-by: Michael Rienstra <michael@goodmoney.com>
This commit is contained in:
Michael Rienstra 2022-09-16 10:40:06 -07:00 committed by GitHub
parent 64aa903f04
commit a800bf7ec1
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
23 changed files with 31 additions and 31 deletions

View file

@ -3,19 +3,19 @@
The easiest way to check out one of these examples on your machine is by running this command in an empty directory: The easiest way to check out one of these examples on your machine is by running this command in an empty directory:
``` ```
npm init astro -- --template [EXAMPLE_NAME] npm create astro@latest -- --template [EXAMPLE_NAME]
``` ```
## Community Examples ## Community Examples
Visit [awesome-astro](https://github.com/one-aalam/awesome-astro) for a full list of community examples. You can use `npm init astro` to check out any community examples: Visit [awesome-astro](https://github.com/one-aalam/awesome-astro) for a full list of community examples. You can use `npm create astro@latest` to check out any community examples:
``` ```
npm init astro -- --template [GITHUB_USER]/[REPO_NAME] npm create astro@latest -- --template [GITHUB_USER]/[REPO_NAME]
``` ```
Paths to examples nested inside of a repo are also supported: Paths to examples nested inside of a repo are also supported:
``` ```
npm init astro -- --template [GITHUB_USER]/[REPO_NAME]/path/to/example npm create astro@latest -- --template [GITHUB_USER]/[REPO_NAME]/path/to/example
``` ```

View file

@ -1,7 +1,7 @@
# Astro Starter Kit: Blog # Astro Starter Kit: Blog
``` ```
npm init astro -- --template blog npm create astro@latest -- --template blog
``` ```
[![Open in StackBlitz](https://developer.stackblitz.com/img/open_in_stackblitz.svg)](https://stackblitz.com/github/withastro/astro/tree/latest/examples/blog) [![Open in StackBlitz](https://developer.stackblitz.com/img/open_in_stackblitz.svg)](https://stackblitz.com/github/withastro/astro/tree/latest/examples/blog)

View file

@ -3,7 +3,7 @@
This is a template for an Astro component library. Use this template for writing components to use in multiple projects or publish to NPM. This is a template for an Astro component library. Use this template for writing components to use in multiple projects or publish to NPM.
``` ```
npm init astro -- --template component npm create astro@latest -- --template component
``` ```
[![Open in StackBlitz](https://developer.stackblitz.com/img/open_in_stackblitz.svg)](https://stackblitz.com/github/withastro/astro/tree/latest/examples/non-html-pages) [![Open in StackBlitz](https://developer.stackblitz.com/img/open_in_stackblitz.svg)](https://stackblitz.com/github/withastro/astro/tree/latest/examples/non-html-pages)

View file

@ -1,7 +1,7 @@
# Astro Starter Kit: Docs Site # Astro Starter Kit: Docs Site
```bash ```bash
npm init astro -- --template docs npm create astro@latest -- --template docs
``` ```
[![Open in StackBlitz](https://developer.stackblitz.com/img/open_in_stackblitz.svg)](https://stackblitz.com/github/withastro/astro/tree/latest/examples/docs) [![Open in StackBlitz](https://developer.stackblitz.com/img/open_in_stackblitz.svg)](https://stackblitz.com/github/withastro/astro/tree/latest/examples/docs)

View file

@ -1,7 +1,7 @@
# Astro + AlpineJS Example # Astro + AlpineJS Example
``` ```
npm init astro -- --template framework-alpine npm create astro@latest -- --template framework-alpine
``` ```
[![Open in StackBlitz](https://developer.stackblitz.com/img/open_in_stackblitz.svg)](https://stackblitz.com/github/withastro/astro/tree/latest/examples/framework-alpine) [![Open in StackBlitz](https://developer.stackblitz.com/img/open_in_stackblitz.svg)](https://stackblitz.com/github/withastro/astro/tree/latest/examples/framework-alpine)

View file

@ -1,7 +1,7 @@
# Astro + Lit Example # Astro + Lit Example
``` ```
npm init astro -- --template framework-lit npm create astro@latest -- --template framework-lit
``` ```
[![Open in StackBlitz](https://developer.stackblitz.com/img/open_in_stackblitz.svg)](https://stackblitz.com/github/withastro/astro/tree/latest/examples/framework-lit) [![Open in StackBlitz](https://developer.stackblitz.com/img/open_in_stackblitz.svg)](https://stackblitz.com/github/withastro/astro/tree/latest/examples/framework-lit)

View file

@ -1,7 +1,7 @@
# Kitchen Sink: Microfrontends with Astro # Kitchen Sink: Microfrontends with Astro
``` ```
npm init astro -- --template framework-multiple npm create astro@latest -- --template framework-multiple
``` ```
[![Open in StackBlitz](https://developer.stackblitz.com/img/open_in_stackblitz.svg)](https://stackblitz.com/github/withastro/astro/tree/latest/examples/framework-multiple) [![Open in StackBlitz](https://developer.stackblitz.com/img/open_in_stackblitz.svg)](https://stackblitz.com/github/withastro/astro/tree/latest/examples/framework-multiple)

View file

@ -1,7 +1,7 @@
# Astro + Preact Example # Astro + Preact Example
``` ```
npm init astro -- --template framework-preact npm create astro@latest -- --template framework-preact
``` ```
[![Open in StackBlitz](https://developer.stackblitz.com/img/open_in_stackblitz.svg)](https://stackblitz.com/github/withastro/astro/tree/latest/examples/framework-preact) [![Open in StackBlitz](https://developer.stackblitz.com/img/open_in_stackblitz.svg)](https://stackblitz.com/github/withastro/astro/tree/latest/examples/framework-preact)

View file

@ -1,7 +1,7 @@
# Astro + React Example # Astro + React Example
``` ```
npm init astro -- --template framework-react npm create astro@latest -- --template framework-react
``` ```
[![Open in StackBlitz](https://developer.stackblitz.com/img/open_in_stackblitz.svg)](https://stackblitz.com/github/withastro/astro/tree/latest/examples/framework-react) [![Open in StackBlitz](https://developer.stackblitz.com/img/open_in_stackblitz.svg)](https://stackblitz.com/github/withastro/astro/tree/latest/examples/framework-react)

View file

@ -1,7 +1,7 @@
# Astro + Solid.js Example # Astro + Solid.js Example
``` ```
npm init astro -- --template framework-solid npm create astro@latest -- --template framework-solid
``` ```
[![Open in StackBlitz](https://developer.stackblitz.com/img/open_in_stackblitz.svg)](https://stackblitz.com/github/withastro/astro/tree/latest/examples/framework-solid) [![Open in StackBlitz](https://developer.stackblitz.com/img/open_in_stackblitz.svg)](https://stackblitz.com/github/withastro/astro/tree/latest/examples/framework-solid)

View file

@ -1,7 +1,7 @@
# Astro + Svelte Example # Astro + Svelte Example
``` ```
npm init astro -- --template framework-svelte npm create astro@latest -- --template framework-svelte
``` ```
[![Open in StackBlitz](https://developer.stackblitz.com/img/open_in_stackblitz.svg)](https://stackblitz.com/github/withastro/astro/tree/latest/examples/framework-svelte) [![Open in StackBlitz](https://developer.stackblitz.com/img/open_in_stackblitz.svg)](https://stackblitz.com/github/withastro/astro/tree/latest/examples/framework-svelte)

View file

@ -1,7 +1,7 @@
# Astro + Vue Example # Astro + Vue Example
``` ```
npm init astro -- --template framework-vue npm create astro@latest -- --template framework-vue
``` ```
[![Open in StackBlitz](https://developer.stackblitz.com/img/open_in_stackblitz.svg)](https://stackblitz.com/github/withastro/astro/tree/latest/examples/framework-vue) [![Open in StackBlitz](https://developer.stackblitz.com/img/open_in_stackblitz.svg)](https://stackblitz.com/github/withastro/astro/tree/latest/examples/framework-vue)

View file

@ -1,7 +1,7 @@
# Astro Starter Kit: Minimal # Astro Starter Kit: Minimal
``` ```
npm init astro -- --template minimal npm create astro@latest -- --template minimal
``` ```
[![Open in StackBlitz](https://developer.stackblitz.com/img/open_in_stackblitz.svg)](https://stackblitz.com/github/withastro/astro/tree/latest/examples/minimal) [![Open in StackBlitz](https://developer.stackblitz.com/img/open_in_stackblitz.svg)](https://stackblitz.com/github/withastro/astro/tree/latest/examples/minimal)

View file

@ -5,7 +5,7 @@ Documentation for "Non-HTML Pages":
https://docs.astro.build/en/core-concepts/astro-pages/#non-html-pages https://docs.astro.build/en/core-concepts/astro-pages/#non-html-pages
``` ```
npm init astro -- --template non-html-pages npm create astro@latest -- --template non-html-pages
``` ```
[![Open in StackBlitz](https://developer.stackblitz.com/img/open_in_stackblitz.svg)](https://stackblitz.com/github/withastro/astro/tree/latest/examples/non-html-pages) [![Open in StackBlitz](https://developer.stackblitz.com/img/open_in_stackblitz.svg)](https://stackblitz.com/github/withastro/astro/tree/latest/examples/non-html-pages)

View file

@ -1,7 +1,7 @@
# Astro Starter Kit: Portfolio # Astro Starter Kit: Portfolio
``` ```
npm init astro -- --template portfolio npm create astro@latest -- --template portfolio
``` ```
[![Open in StackBlitz](https://developer.stackblitz.com/img/open_in_stackblitz.svg)](https://stackblitz.com/github/withastro/astro/tree/latest/examples/portfolio) [![Open in StackBlitz](https://developer.stackblitz.com/img/open_in_stackblitz.svg)](https://stackblitz.com/github/withastro/astro/tree/latest/examples/portfolio)

View file

@ -1,7 +1,7 @@
# Astro Example: Markdown with Plugins # Astro Example: Markdown with Plugins
``` ```
npm init astro -- --template with-markdown-plugins npm create astro@latest -- --template with-markdown-plugins
``` ```
[![Open in StackBlitz](https://developer.stackblitz.com/img/open_in_stackblitz.svg)](https://stackblitz.com/github/withastro/astro/tree/latest/examples/with-markdown-plugins) [![Open in StackBlitz](https://developer.stackblitz.com/img/open_in_stackblitz.svg)](https://stackblitz.com/github/withastro/astro/tree/latest/examples/with-markdown-plugins)

View file

@ -1,7 +1,7 @@
# Astro Example: Markdown with Shiki # Astro Example: Markdown with Shiki
``` ```
npm init astro -- --template with-markdown-shiki npm create astro@latest -- --template with-markdown-shiki
``` ```
[![Open in StackBlitz](https://developer.stackblitz.com/img/open_in_stackblitz.svg)](https://stackblitz.com/github/withastro/astro/tree/latest/examples/with-markdown-shiki) [![Open in StackBlitz](https://developer.stackblitz.com/img/open_in_stackblitz.svg)](https://stackblitz.com/github/withastro/astro/tree/latest/examples/with-markdown-shiki)

View file

@ -1,7 +1,7 @@
# Astro Example: MDX # Astro Example: MDX
``` ```
npm init astro -- --template with-mdx npm create astro@latest -- --template with-mdx
``` ```
[![Open in StackBlitz](https://developer.stackblitz.com/img/open_in_stackblitz.svg)](https://stackblitz.com/github/withastro/astro/tree/latest/examples/with-mdx) [![Open in StackBlitz](https://developer.stackblitz.com/img/open_in_stackblitz.svg)](https://stackblitz.com/github/withastro/astro/tree/latest/examples/with-mdx)

View file

@ -1,7 +1,7 @@
# Astro Example: Nanostores # Astro Example: Nanostores
``` ```
npm init astro -- --template with-nanostores npm create astro@latest -- --template with-nanostores
``` ```
[![Open in StackBlitz](https://developer.stackblitz.com/img/open_in_stackblitz.svg)](https://stackblitz.com/github/withastro/astro/tree/latest/examples/with-nanostores) [![Open in StackBlitz](https://developer.stackblitz.com/img/open_in_stackblitz.svg)](https://stackblitz.com/github/withastro/astro/tree/latest/examples/with-nanostores)

View file

@ -1,7 +1,7 @@
# Astro with Tailwind # Astro with Tailwind
``` ```
npm init astro -- --template with-tailwindcss npm create astro@latest -- --template with-tailwindcss
``` ```
[![Open in StackBlitz](https://developer.stackblitz.com/img/open_in_stackblitz.svg)](https://stackblitz.com/github/withastro/astro/tree/latest/examples/with-tailwindcss) [![Open in StackBlitz](https://developer.stackblitz.com/img/open_in_stackblitz.svg)](https://stackblitz.com/github/withastro/astro/tree/latest/examples/with-tailwindcss)

View file

@ -1,7 +1,7 @@
# Astro Starter Kit: Vite PWA # Astro Starter Kit: Vite PWA
``` ```
npm init astro -- --template with-vite-plugin-pwa npm create astro@latest -- --template with-vite-plugin-pwa
``` ```
[![Open in StackBlitz](https://developer.stackblitz.com/img/open_in_stackblitz.svg)](https://stackblitz.com/github/withastro/astro/tree/latest/examples/with-vite-plugin-pwa) [![Open in StackBlitz](https://developer.stackblitz.com/img/open_in_stackblitz.svg)](https://stackblitz.com/github/withastro/astro/tree/latest/examples/with-vite-plugin-pwa)

View file

@ -1,7 +1,7 @@
# Astro + [Vitest](https://vitest.dev/) Example # Astro + [Vitest](https://vitest.dev/) Example
``` ```
npm init astro -- --template with-vitest npm create astro@latest -- --template with-vitest
``` ```
[![Open in StackBlitz](https://developer.stackblitz.com/img/open_in_stackblitz.svg)](https://stackblitz.com/github/withastro/astro/tree/latest/examples/with-vitest) [![Open in StackBlitz](https://developer.stackblitz.com/img/open_in_stackblitz.svg)](https://stackblitz.com/github/withastro/astro/tree/latest/examples/with-vitest)

View file

@ -5,7 +5,7 @@
**With NPM:** **With NPM:**
```bash ```bash
npm init astro npm create astro@latest
``` ```
**With Yarn:** **With Yarn:**
@ -18,10 +18,10 @@ yarn create astro
```bash ```bash
# npm 6.x # npm 6.x
npm init astro my-astro-project --template starter npm create astro@latest my-astro-project --template starter
# npm 7+, extra double-dash is needed: # npm 7+, extra double-dash is needed:
npm init astro my-astro-project -- --template starter npm create astro@latest my-astro-project -- --template starter
# yarn # yarn
yarn create astro my-astro-project --template starter yarn create astro my-astro-project --template starter
@ -31,7 +31,7 @@ yarn create astro my-astro-project --template starter
You can also use any GitHub repo as a template: You can also use any GitHub repo as a template:
```bash ```bash
npm init astro my-astro-project -- --template cassidoo/shopify-react-astro npm create astro@latest my-astro-project -- --template cassidoo/shopify-react-astro
``` ```
### CLI Flags ### CLI Flags
@ -49,10 +49,10 @@ To debug `create-astro`, you can use the `--verbose` flag which will log the out
```bash ```bash
# npm 6.x # npm 6.x
npm init astro my-astro-project --verbose npm create astro@latest my-astro-project --verbose
# npm 7+, extra double-dash is needed: # npm 7+, extra double-dash is needed:
npm init astro my-astro-project -- --verbose npm create astro@latest my-astro-project -- --verbose
# yarn # yarn
yarn create astro my-astro-project --verbose yarn create astro my-astro-project --verbose