astro/packages/create-astro
金成 1170877b51
Fix multiple create-astro registry issues (#7539)
* fix: getVersion Error when registry ends with '/'

* Update .changeset/old-seahorses-fold.md

* Update .changeset/old-seahorses-fold.md

* refactor: cleanup registry logic

* chore: update changeset

* fix(create-astro): update registry logic to rely on `fetch`

* chore: update changeset

* chore: update lockfile

* Update old-seahorses-fold.md

---------

Co-authored-by: jincheng32537 <jincheng32537@hundsun.com>
Co-authored-by: Nate Moore <natemoo-re@users.noreply.github.com>
Co-authored-by: Nate Moore <nate@astro.build>
2023-06-30 17:24:36 -05:00
..
src Fix multiple create-astro registry issues (#7539) 2023-06-30 17:24:36 -05:00
test Fix changeset publish (#6923) 2023-04-27 22:55:48 +08:00
CHANGELOG.md [ci] release (#7434) 2023-06-22 10:06:15 -04:00
create-astro.mjs create-astro bug fixes (#5319) 2022-11-08 10:33:36 -06:00
package.json Fix multiple create-astro registry issues (#7539) 2023-06-30 17:24:36 -05:00
README.md Format markdown files (#7439) 2023-06-26 11:34:13 +08:00
tsconfig.json Update compilation target for Node 16 (#6213) 2023-03-06 13:57:16 -05:00

create-astro

Scaffolding for Astro projects

With NPM:

npm create astro@latest

With Yarn:

yarn create astro

create-astro automatically runs in interactive mode, but you can also specify your project name and template with command line arguments.

# npm 6.x
npm create astro@latest my-astro-project --template minimal

# npm 7+, extra double-dash is needed:
npm create astro@latest my-astro-project -- --template minimal

# yarn
yarn create astro my-astro-project --template minimal

Check out the full list of example templates, available on GitHub.

You can also use any GitHub repo as a template:

npm create astro@latest my-astro-project -- --template cassidoo/shopify-react-astro

CLI Flags

May be provided in place of prompts

Name Description
--template <name> Specify your template.
--install / --no-install Install dependencies (or not).
--git / --no-git Initialize git repo (or not).
--yes (-y) Skip all prompt by accepting defaults.
--no (-n) Skip all prompt by declining defaults.
--dry-run Walk through steps without executing.
--skip-houston Skip Houston animation.
--typescript <option> TypeScript option: strict / strictest / relaxed.