0
Fork 0
mirror of https://github.com/withastro/astro.git synced 2024-12-16 21:46:22 -05:00
astro/packages/create-astro
李瑞丰 d0dbee872f
create-astro help info add --typescript flag (#6294)
* create-astro help info add --typescript flag

* changeset

* changeset
2023-02-21 10:33:52 -06:00
..
src create-astro help info add --typescript flag (#6294) 2023-02-21 10:33:52 -06:00
test [ci] format 2023-02-06 16:21:48 +00:00
CHANGELOG.md [ci] release (#6269) 2023-02-17 14:48:21 +01:00
create-astro.mjs create-astro bug fixes (#5319) 2022-11-08 10:33:36 -06:00
package.json [ci] release (#6269) 2023-02-17 14:48:21 +01:00
README.md create-astro help info add --typescript flag (#6294) 2023-02-21 10:33:52 -06:00
tsconfig.json Refactor create-astro (#6082) 2023-02-06 10:19:37 -06: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.