Skip to content

Instantly share code, notes, and snippets.

@gbalbuena
Created August 7, 2020 03:48
Show Gist options
  • Save gbalbuena/bb755357ff51f9deccbf1ec442f02691 to your computer and use it in GitHub Desktop.
Save gbalbuena/bb755357ff51f9deccbf1ec442f02691 to your computer and use it in GitHub Desktop.
Node makefile - for Makefile lovers who want to have a initial file - see more here https://github.com/gbalbuena/makefile-by-example
clean: ## Clean deps
@echo "Clean deps and artefacts"
@npm cache verify
install: ## Install dependencies
@echo "Installing Node dependencies"
@npm ci
start: ## Run in local
@echo "Run"
@npm start
lint: ## Linting
@npm run lint
test:
@npm test
help: ## Help
@grep -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | sort | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-30s\033[0m %s\n", $$1, $$2}'
.PHONY: help
.DEFAULT_GOAL := help
clean: ## Clean deps
@echo "Clean deps and artefacts"
@npx lerna clean --yes
install: ## Install dependencies
@echo "Installing Node dependencies"
@yarn install --frozen-lockfile
start: ## Run in local
@echo "Running server in local"
@yarn start
lint: ## Linting
@yarn lint
test:
@yarn test
help: ## Help
@grep -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | sort | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-30s\033[0m %s\n", $$1, $$2}'
.PHONY: help
.DEFAULT_GOAL := help
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment