forked from yodra/shop
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
56 lines (42 loc) · 1.66 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
53
54
55
56
.DEFAULT_GOAL := help
help:
@cat $(MAKEFILE_LIST) | grep -e "^[a-zA-Z_\-]*: *.*## *" | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-30s\033[0m %s\n", $$1, $$2}'
init: ## Configure the project for the first time
@echo "Initialising the project"
@npm install
start: ## Execute the project on local environment
@echo "🏃♀️ Running the project"
@npm run dev
up: ## Execute the project on docker
@echo "🏃♀️ Running the project on docker"
@docker-compose up -d --build
up_services: ## Execute the integration services
@echo "🏃♀️ Running services"
@docker-compose up -d database
down: ## Stop and remove containers
@echo "🛑️ Stopping the project and removing containers"
@docker-compose down
test: ## Run the test
@echo "🧪 Running test"
@npm run test
test-watch: ## Run the test watch mode
@echo "🧪 Running test watch mode"
@npm run test-watch
clean: ## Remove the `dist` folder
@echo "🧹 Cleaning"
@rm -rf dist
clean_all: clean ## Remove the `package-lock.json`, `node_modules` and `dist` folders
@echo "🧨 Cleaning all"
@rm -rf node_modules package-lock.json
migrate_create: ## Create a new migration. Example: `make migrate_create migration=create-basic-users`
@echo "🗄️ Creating migration"
@./node_modules/.bin/migrate-mongo create $(migration)
migrate_up: ## Execute the migrations
@echo "📂 Running migrations"
@./node_modules/.bin/migrate-mongo up
migrate_down: ## Execute rollback the last migration
@echo "↩️️ Rollback the last migration"
@./node_modules/.bin/migrate-mongo down
migrate_status: ## Show the status of migrations
@echo "👀 Status migrations"
@./node_modules/.bin/migrate-mongo status