-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
52 lines (40 loc) · 1.04 KB
/
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
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
.PHONY: build setup test
ENV_FILE ?= .env
# add env variables if needed
ifneq (,$(wildcard ${ENV_FILE}))
include ${ENV_FILE}
export
endif
export GREEN=\033[0;32m
export NOFORMAT=\033[0m
# ------------------------------------------------------------------------------
# Commands
#
default: help
#💻 build: @ Build the nodejs application
build: SHELL:=/bin/bash
build:
@yarn build
#❓ help: @ Displays this message
help: SHELL:=/bin/bash
help:
@grep -E '[a-zA-Z\.\-]+:.*?@ .*$$' $(firstword $(MAKEFILE_LIST))| tr -d '#' | awk 'BEGIN {FS = ":.*?@ "}; {printf "${GREEN}%-30s${NOFORMAT} %s\n", $$1, $$2}'
#💻 lint: @ Runs lint fixes and formatter
.PHONY: lint
lint:
@npm run lint
#💻 check: @ Runs all linting checks
check:
@npm run lint:check
#💻 server: @ Starts the nodejs development server
server: SHELL:=/bin/bash
server:
@yarn start
#📦 setup: @ Installs node dependencies
setup: SHELL:=/bin/bash
setup:
@yarn install
#🧪 test: @ Runs all test suites
test: SHELL:=/bin/bash
test:
@yarn test -- --watchAll=false --passWithNoTests