Skip to content

Instantly share code, notes, and snippets.

@hrshadhin
Created August 16, 2020 15:21
Show Gist options
  • Save hrshadhin/5c2dd267eac91cf0a8f1fd5f2bd797ef to your computer and use it in GitHub Desktop.
Save hrshadhin/5c2dd267eac91cf0a8f1fd5f2bd797ef to your computer and use it in GitHub Desktop.
A self-documenting Makefile
.PHONY: help
help: ## Show this help message.
@egrep -h '\s##\s' $(MAKEFILE_LIST) | sort | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-20s\033[0m %s\n", $$1, $$2}'
env: ## Setup environment
@echo "Setuping env...."
install: ## Install or update dependencies
@echo "Installing dependencies..."
serve: ## Run the local development server
@echo "Serving api.."
build: ## Build the app
@echo "Bulding the app..."
dev: env install serve ## Install tools and start development server
prod: env install build ## Install tools and build the app for production
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment