-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
30 lines (25 loc) · 832 Bytes
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
.PHONY: help
help: ## Prints help for targets with comments
@grep -E '^[a-zA-Z._-]+:.*?## .*$$' $(MAKEFILE_LIST) | \
sort | \
awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-30s\033[0m %s\n", $$1, $$2}'
.PHONY: install
install: ## Installs project dependencies
yarn install
.PHONY: clean
clean: ## Cleans build artifacts
yarn clean
.PHONY: dev
dev: FLAGS ?= '--open'
dev: ## Starts dev web server with a clear cache
yarn develop ${FLAGS}
.PHONY: post
post:
@./bin/generate_blog_post.sh
.PHONY: pin-nodejs
pin-nodejs: NODE_VERSION ?= $(subst v,,$(shell node -v))
pin-nodejs: ## Updates the version of Node.js used by this project
@echo "🛠 Pinning Node.js version to ${NODE_VERSION}"
@echo ${NODE_VERSION} > .node-version
@sed -i '' -e 's/nodejs .*/nodejs ${NODE_VERSION}/' .tool-versions
@echo "🤙🏻 Done."