mirror of https://github.com/halo-dev/halo
Add Makefile for convenient operations (halo-dev/console#641)
#### What type of PR is this? /kind feature /area console #### What this PR does / why we need it: ```bash ╰─❯ make help all lint and test code install install dependencies build build console lint lint code test run tests help print this help ``` #### Does this PR introduce a user-facing change? ```release-note None ```pull/3445/head
parent
5b12cf8ce4
commit
d089ec63b4
|
@ -0,0 +1,26 @@
|
|||
SHELL := /usr/bin/env bash -o errexit -o pipefail -o nounset
|
||||
|
||||
.PHONY: all
|
||||
all: lint test ## lint and test code
|
||||
|
||||
.PHONY: install
|
||||
install: ## install dependencies
|
||||
pnpm install
|
||||
|
||||
.PHONY: build
|
||||
build: install ## build console
|
||||
pnpm build:packages
|
||||
pnpm build
|
||||
|
||||
.PHONY: lint
|
||||
lint: install ## lint code
|
||||
pnpm lint
|
||||
pnpm typecheck
|
||||
|
||||
.PHONY: test
|
||||
test: install ## run tests
|
||||
pnpm test:unit
|
||||
|
||||
.PHONY: help
|
||||
help: ## print this help
|
||||
@awk 'BEGIN {FS = ":.*?## "} /^[a-zA-Z0-9_-]+:.*?## / {gsub("\\\\n",sprintf("\n%22c",""), $$2);printf "\033[36m%-20s\033[0m %s\n", $$1, $$2}' $(MAKEFILE_LIST)
|
Loading…
Reference in New Issue