astro/examples/component
Fred K. Schott 078b6cde6c [ci] release (next) (#2838)
This reverts commit 935e6fa0c8.
2022-03-20 21:02:08 -07:00
..
demo [ci] release (next) (#2838) 2022-03-20 21:02:08 -07:00
packages/my-component Use accessible indentation (#2253) 2021-12-22 16:11:05 -05:00
.gitignore Normalize and cleanup examples projects (#2364) 2022-01-12 10:37:16 -05: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 [ci] release (next) (#2838) 2022-03-20 21:02:08 -07:00
pnpm-workspace.yaml fix format (#2736) 2022-03-08 15:20:04 -08:00
README.md Add Component Example (#2203) 2021-12-17 08:47:59 -05: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

👀 Want to learn more?

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