Makefile, Dockerfile, CI workflow, prettier config, manifests for Chrome (MV3) and Firefox (MV2), source directory structure, and minimal test suite. All checks pass.
This commit is contained in:
42
Makefile
Normal file
42
Makefile
Normal file
@@ -0,0 +1,42 @@
|
||||
.PHONY: test lint fmt fmt-check check docker hooks build clean dev
|
||||
|
||||
test:
|
||||
@echo "Running tests..."
|
||||
@timeout 30 yarn run test 2>&1
|
||||
|
||||
lint:
|
||||
@echo "Linting..."
|
||||
@yarn run lint 2>&1
|
||||
|
||||
fmt:
|
||||
@echo "Formatting..."
|
||||
@yarn run fmt 2>&1
|
||||
|
||||
fmt-check:
|
||||
@echo "Checking formatting..."
|
||||
@yarn run fmt-check 2>&1
|
||||
|
||||
check: test lint fmt-check
|
||||
|
||||
build:
|
||||
@echo "Building extension..."
|
||||
@yarn run build 2>&1
|
||||
|
||||
clean:
|
||||
@rm -rf dist/
|
||||
|
||||
dev:
|
||||
@echo "Building in watch mode..."
|
||||
@yarn run build --watch 2>&1
|
||||
|
||||
docker:
|
||||
@docker build -t autistmask .
|
||||
|
||||
hooks:
|
||||
@echo "Installing pre-commit hook..."
|
||||
@mkdir -p .git/hooks
|
||||
@echo '#!/usr/bin/env bash' > .git/hooks/pre-commit
|
||||
@echo 'set -euo pipefail' >> .git/hooks/pre-commit
|
||||
@echo 'make check' >> .git/hooks/pre-commit
|
||||
@chmod +x .git/hooks/pre-commit
|
||||
@echo "Pre-commit hook installed."
|
||||
Reference in New Issue
Block a user