astro/examples/component
Fred K. Schott 3a7f2385ea Revert "[ci] release (#4223)"
This reverts commit d4ad409875.
2022-08-09 17:28:02 -07:00
..
demo Revert "[ci] release (#4223)" 2022-08-09 17:28:02 -07:00
packages/my-component [ci] format 2022-08-06 04:39:26 +00:00
.gitignore refactor(vercel): Build Output API v3 (#3216) 2022-05-11 15:10:38 -06:00
.npmrc Move from yarn to pnpm (#2455) 2022-03-08 15:46:11 -06:00
.stackblitzrc Add Component Example (#2203) 2021-12-17 08:47:59 -05:00
package.json Revert "[ci] release (#4223)" 2022-08-09 17:28:02 -07:00
pnpm-workspace.yaml fix format (#2736) 2022-03-08 15:20:04 -08:00
README.md update example scripts (#4098) 2022-08-05 21:36:23 -07:00
sandbox.config.json Add Component Example (#2203) 2021-12-17 08:47:59 -05:00

Astro Starter Kit: Component

npm init astro -- --template component

Open in StackBlitz

🧑‍🚀 Seasoned astronaut? Delete this file. Have fun!

🚀 Project Structure

Inside of your Astro project, you'll see the following folders and files:

/
├── demo/
│   ├── public/
│   └── src/
│       └── pages/
│           └── index.astro
└── packages/
    └── my-component/
        ├── index.js
        └── package.json

This project uses workspaces to develop a single package, @example/my-component, from packages/my-component. It also includes a demo Astro site for testing and demonstrating the component.

🧞 Commands

All commands are run from the root of the project, from a terminal:

Command Action
npm install Installs dependencies
npm run dev Starts local dev server at localhost:3000
npm run build Build your production site to ./dist/
npm run preview Preview your build locally, before deploying
npm run astro ... Run CLI commands like astro add, astro check
npm run astro --help Get help using the Astro CLI

👀 Want to learn more?

Feel free to check our documentation or jump into our Discord server.