Inside of your Astro project, you'll see the following folders and files:
/
├── public/
│ └── favicon.svg
├── src/
│ ├── layouts/
│ │ └── Layout.astro
│ └── pages/
│ └── index.astro
├── astro.config.ts
├── biome.jsonc
├── tsconfig.json
├── vitest.config.ts
├── .nvmrc
├── tests/
├── .husky/
│ └── pre-commit.sh
└── package.json
To learn more about the folder structure of an Astro project, refer to Astro's guide on project structure.
All commands are run from the root of the project, from a terminal:
Command | Action |
---|---|
npm install |
Installs dependencies |
npm dev |
Starts local dev server at localhost:4321 |
npm build |
Build your production site to ./dist/ |
npm preview |
Preview your build locally, before deploying |
npm astro ... |
Run CLI commands like astro add , astro check |
npm lint |
Run Biome linter |
npm lint-fix |
Run Biome linter and fix issues |
npm format |
Format files using Biome |
npm check |
Run Biome formatting and linting checks |
npm check:fix |
Run Biome formatting and linting checks and fix issues |
npm type-check |
Run TypeScript type checking |
npm validate |
Run all checks |
npm outdated |
Check for outdated packages |
npm update |
Update all packages to the latest versions |
npm astro add tailwind sitemap
npm add --save-dev --save-exact @biomejs/biome
npm biome init
npm add --save-dev husky
npm exec husky init
A pre-commit hook has been configured in .husky/pre-commit
that runs biome check, tsc and astro check before each commit to format, lint and type check the code.