Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions .github/workflows/deploy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -37,12 +37,12 @@ jobs:
- name: Install Dependencies
run: pnpm install --frozen-lockfile

# One step, so a check added to `lint` runs in CI without editing this
# file. The link check is not part of `lint`: it reads dist/ and so
# belongs to the build, which runs it.
- name: Lint
run: pnpm run lint

- name: Check inline spacing
run: pnpm run check:spacing

- name: Build Astro
run: pnpm run build

Expand Down
29 changes: 29 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
.DEFAULT_GOAL := help
.PHONY: help install dev build preview lint clean

# Scripts are always invoked as `pnpm run <name>`: several plausible script
# names (install, add, ...) collide with built-in pnpm commands, which take
# precedence and would run something else entirely. `pnpm lint` used to fall
# through to an unrelated `lint` binary on PATH for the same reason.

help: ## Show this help
@grep -hE '^[a-zA-Z_-]+:.*?## ' $(MAKEFILE_LIST) \
| awk 'BEGIN {FS = ":.*?## "}; {printf " \033[36m%-9s\033[0m %s\n", $$1, $$2}'

install: ## Install dependencies exactly as the lockfile pins them
pnpm install --frozen-lockfile

dev: ## Dev server at localhost:4321
pnpm run dev

build: ## Production build to dist/, including the internal link check
pnpm run build

preview: ## Build, then serve the production output
pnpm run preview

lint: ## Every static check that does not need a build first
pnpm run lint

clean: ## Remove build output
rm -rf dist .astro
7 changes: 4 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,11 @@
"preview": "astro preview",
"preview:network": "astro preview --host",
"astro": "astro",
"lint": "eslint .",
"lint": "pnpm run lint:eslint && pnpm run lint:spacing",
"lint:eslint": "eslint .",
"lint:fix": "eslint . --fix",
"check:spacing": "node scripts/check-inline-spacing.mjs",
"check:links": "node scripts/check-internal-links.mjs"
"lint:spacing": "node scripts/check-inline-spacing.mjs",
"lint:links": "node scripts/check-internal-links.mjs"
},
"dependencies": {
"@astrojs/check": "^0.9.10",
Expand Down