Makefile
.DEFAULT_GOAL := help
SHELL = /bin/bash
.SHELLFLAGS = -o pipefail -c
.PHONY: all
all: fmt build test ## Everything that's a must before committing: fmt, build, test.
.PHONY: help
help: ## Print info about all commands
@echo "Commands:"
@echo
@grep -E '^[a-zA-Z0-9_-]+:.*?## .*$$' $(MAKEFILE_LIST) \
| awk 'BEGIN {FS = ":.*?## "}; {printf " \033[01;32m%-20s\033[0m %s\n", $$1, $$2}'
.PHONY: setup
setup: ## One-time dev env setup: install deps, activate git hooks.
npm install
git config core.hooksPath hack/git-hooks
.PHONY: fmt
fmt: ## Format source in place (dprint).
npm run fmt
.PHONY: check
check: ## Verify-only and fast; run by the pre-commit hook on every commit.
npm run check
.PHONY: build
build: ## Emit dist/ for the publishable packages, and bundle the gallery.
npm run build
.PHONY: test
test: ## Run the unit tests.
npm run test
.PHONY: check-e2e
check-e2e: build ## Drive the gallery in a headless Chrome with trusted input (~10s). Not part of check.
npm run test:e2e --workspace packages/e2e
.PHONY: clean
clean: ## Remove regenerable outputs.
npm run clean
.PHONY: publish
publish: build ## Publish the public packages to npm.
npm publish --workspace packages/yukey --workspace packages/yukey-testkit
Makefile · 1.2 KiB · 84d8916957