A Makefile that documents itself

Plaintext

Running make with no arguments prints every target that carries a comment.

.DEFAULT_GOAL := help

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

build:  ## Compile the assets
	npm run build

test:  ## Run the test suite
	npm test

.PHONY: help build test

More in Build & CI

Random picks