After forking the repo from GitHub and installing pnpm:
git clone https://github.com/<your-name-here>/dot-com
cd dot-com
pnpm install
This repository includes a list of suggested VS Code extensions. It's a good idea to use VS Code and accept its suggestion to install them, as they'll help with development.
All Astro commands are run from the root of the project, from a terminal:
Command | Action |
---|---|
pnpm run dev |
Starts local dev server at localhost:3000 |
pnpm run build |
Build your production site to ./dist/ |
pnpm run preview |
Preview your build locally, before deploying |
pnpm run astro ... |
Run CLI commands like astro add , astro check |
pnpm run astro --help |
Get help using the Astro CLI |
Prettier is used to format code. It should be applied automatically when you save files in VS Code or make a Git commit.
To manually reformat all files, you can run:
pnpm format:write
This package includes several forms of linting to enforce consistent code quality and styling. Each should be shown in VS Code, and can be run manually on the command-line:
pnpm lint:knip
(knip): Detects unused files, dependencies, and code exportspnpm lint:md
(Markdownlint): Checks Markdown source filespnpm lint:package
(npm-package-json-lint): Lints thepackage.json
filepnpm lint:packages
(pnpm-deduplicate): Deduplicates packages in thepnpm-lock.yml
filepnpm lint:spelling
(cspell): Spell checks across all source filespnpm lint
(ESLint with typescript-eslint): Lints JavaScript and TypeScript source files
Vitest is used for tests. You can run it locally on the command-line:
pnpm run test
Add the --coverage
flag to compute test coverage and place reports in the coverage/
directory:
pnpm run test --coverage