0.2.1 • Published 1 year ago

create-astra v0.2.1

Weekly downloads
-
License
MIT
Repository
github
Last release
1 year ago

create-astra

Scaffolding for Astro projects

With NPM:

npm create astra@latest

With Yarn:

yarn create astra

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

# npm 6.x
npm create astra@latest my-astra-project --template starter

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

# yarn
yarn create astra my-astra-project --template starter

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

You can also use any GitHub repo as a template:

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

CLI Flags

May be provided in place of prompts

NameDescription
--templateSpecify the template name (list)
--commitSpecify a specific Git commit or branch to use from this repo (by default, main branch of this repo will be used)
--fancyFor Windows users, --fancy will enable full unicode support
--typescriptSpecify the tsconfig to use
--yes/-ySkip prompts and use default values

Debugging

To debug create-astra, you can use the --verbose flag which will log the output of degit and some more information about the command, this can be useful when you encounter an error and want to report it.

# npm 6.x
npm create astra@latest my-astra-project --verbose

# npm 7+, extra double-dash is needed:
npm create astra@latest my-astra-project -- --verbose

# yarn
yarn create astra my-astra-project --verbose