astro/examples/component
Dan Jutan d5bd23d5f4
Update templates to avoid devDependencies and :global (#4576)
* devDependencies => dependencies

* :global -> is:global

* update lockfile

* remove unneeded markdown dependency

* fix remaining merge conflicts

* update lockfile
2022-08-31 16:17:15 -04:00
..
demo [ci] release (#4520) 2022-08-30 12:45:04 -04:00
packages/my-component Remove "as Props" from the astro examples (#4494) 2022-08-26 10:16:17 -04: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 Update templates to avoid devDependencies and :global (#4576) 2022-08-31 16:17:15 -04: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.