npm init astro -- --template astro-community/plugin-template
Inside of your Astro project, you'll see the following folders and files:
/
├── demo/
│ ├── public/
│ └── src/
│ └── pages/
│ └── index.astro
└── packages/
└── my-plugin/
├── index.js
└── package.json
This project uses workspaces to develop a single package, @example/my-plugin
.
It also includes a minimal Astro project, demo
, for developing and demonstrating the plugin.
All commands are run from the root of the project, from a terminal:
Command | Action |
---|---|
npm install |
Installs dependencies |
npm run start |
Starts local dev server at localhost:3000 |
npm run build |
Build your production site to ./dist/ |
npm run serve |
Preview your build locally, before deploying |
Want to learn more? Read our documentation or jump into our Discord server.