-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
40 lines (21 loc) · 886 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
31
32
33
34
35
36
37
38
39
40
SHELL:=/bin/bash
NBIN=./node_modules/.bin
AVA=node -r babel-register ./node_modules/.bin/ava
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}'
test: ## Run the tests once
$(AVA)
test-watch: ## Run the tests when files change
$(AVA) --watch
lint: ## Run the linter
$(NBIN)/eslint .
lint-fix: ## Auto fix lint errors where possible
$(NBIN)/eslint . --fix
deploy-dev: ## Deploy to the dev environment
$(NBIN)/sls deploy --stage=dev
deploy-prod: test ## Deploy to the prod environment
$(NBIN)/sls deploy --stage=prod
logs-dev: ## View dev logs
NODE_ENV=production $(NBIN)/sls logs --function handleMessage --stage=dev
logs-prod: test ## View prod logs
NODE_ENV=production $(NBIN)/sls logs --function handleMessage --stage=prod