Make Is Already Installed on Your Machine
Every project needs common commands. Put them in a Makefile.
Example
.PHONY: dev test build deploy
dev:
npm run dev
test:
npm test
build:
npm run build
deploy: build
rsync -avz dist/ server:/var/www/app/
install:
npm install
setup: install
echo "Ready!"
Usage
make dev # Start dev server
make test # Run tests
make deploy # Build + deploy
make setup # Full project setup
Why Makefile
- Works for ANY language (Python, Go, Rust, not just JS)
- Dependencies between tasks (deploy depends on build)
- Tab completion in most shells
- No npm required
- Already installed on every Unix machine
Python Makefile
dev:
python -m uvicorn app:app --reload
test:
pytest -v
lint:
ruff check .
format:
ruff format .
Every project. Every language. Just use Make.
More from me: 10 Dev Tools I Use Daily | 77 Scrapers on a Schedule | 150+ Free APIs
Top comments (0)