64 lines
1.1 KiB
Makefile
64 lines
1.1 KiB
Makefile
# Makefile for caperren.com
|
|
|
|
.PHONY: \
|
|
install \
|
|
fix \
|
|
astro_upgrade \
|
|
build \
|
|
dev \
|
|
dev-hosted \
|
|
test \
|
|
_spelling-generate-new-words \
|
|
spelling-find-new-words \
|
|
spelling-add-new-words \
|
|
spelling-check \
|
|
cleanup-check \
|
|
cleanup-code
|
|
|
|
default: dev
|
|
|
|
install:
|
|
npm install
|
|
|
|
fix:
|
|
npm audit fix
|
|
|
|
astro_upgrade:
|
|
npx @astrojs/upgrade
|
|
|
|
build:
|
|
npm run build
|
|
|
|
dev:
|
|
npm run dev
|
|
|
|
dev-hosted:
|
|
npm run dev-hosted
|
|
|
|
test: spelling-check
|
|
@npx playwright install --with-deps
|
|
npm run test --ui
|
|
npx playwright test --ui
|
|
|
|
_spelling-generate-new-words:
|
|
@cspell --words-only --unique . 2>/dev/null | sort --ignore-case -o new-words.txt
|
|
|
|
spelling-find-new-words: _spelling-generate-new-words
|
|
@echo "Found the following new words:"
|
|
@cat new-words.txt
|
|
@rm -f new-words.txt
|
|
|
|
spelling-add-new-words: _spelling-generate-new-words
|
|
@echo "Adding to project-words.txt"
|
|
@cat new-words.txt >> project-words.txt
|
|
@rm -f new-words.txt
|
|
@cat project-words.txt | sort --ignore-case -o project-words.txt
|
|
|
|
spelling-check:
|
|
npx cspell .
|
|
|
|
cleanup-check:
|
|
npx prettier . --check
|
|
|
|
cleanup-code:
|
|
npx prettier . --write
|