Skip to content

Custom Scripts

This project uses a collection of custom scripts to automate common tasks, enforce quality standards, and enhance the build process.

CommandDescription
startStart development server
start:hostStart development server with network access
start:debugStart development server with verbose logging
previewPreview production build locally
cleanRemove build artifacts (dist, .astro)
clean:allRemove build artifacts and node_modules cache
CommandDescription
buildBuild tokens then build site for production
build:ciBuild for CI with verbose logging
tokens:buildCompile design tokens to CSS variables and Tailwind config
CommandDescription
formatFormat code with Biome
format:checkCheck code formatting without changes
lintLint code with Biome
lint:mdLint Markdown files
lint:md:fixFix Markdown linting issues
typecheckRun Astro type checking
typecheck:typesRun TypeScript type checking only
qualityRun all quality checks (format, lint, markdown, types)
CommandDescription
testRun unit tests with Vitest
test:unitRun unit tests once
test:e2eRun Playwright end-to-end tests
test:e2e:uiRun E2E tests with UI
test:a11yRun accessibility tests
CommandDescription
docs:syncSync documentation from separate docs repo (available at launch)
docs:updateSync docs and inject current package versions for AI context
docs:componentsStart Astrobook component documentation
docs:components:buildBuild Astrobook documentation
roadmap:updateUpdate implementation roadmap status
CommandDescription
images:analyzeAnalyze image sizes and optimization opportunities
images:optimizeInteractive image optimization tool
bundle:analyzeAnalyze bundle size and composition
perf:budgetsCheck performance against defined budgets
perf:baselineTrack baseline performance metrics
perf:lighthouseRun Lighthouse performance audit
perf:lighthouse:ciRun Lighthouse for CI (JSON output)
CommandDescription
design:validateValidate color contrast compliance (WCAG AA)
budgets:validateValidate performance budget overrides
CommandDescription
auditRun security audit on production dependencies
audit:ciRun filtered security audit for CI
CommandDescription
prepareInstall Husky git hooks