-
-
Notifications
You must be signed in to change notification settings - Fork 143
/
Makefile
33 lines (27 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
DEFAULT_GOAL := help
port := 5000
.PHONY: help
help:
@echo
@echo Manage micro-frontends with single-spa
@echo
@fgrep "##" $(MAKEFILE_LIST) | fgrep -v fgrep | sed -e 's/\\$$//' | sed -e 's/:.*## / - /'
@echo
.PHONY: install
install: ## Install all dependencies
@pushd ./root-html-file >/dev/null && (npm install &) && popd >/dev/null
@pushd ./app1 >/dev/null && (npm install &) && popd >/dev/null
@pushd ./app2 >/dev/null && (npm install &) && popd >/dev/null
@pushd ./navbar >/dev/null && (npm install &) && popd >/dev/null
.PHONY: clean
clean: ## Clean all endpoints
@rm */node_modules -rf
.PHONY: start
start: ## Start all endpoints
@pushd ./root-html-file >/dev/null && (npx serve -s -l $(port) &) && popd >/dev/null
@pushd ./app1 >/dev/null && (npx vue-cli-service serve --port 8081 &) && popd >/dev/null
@pushd ./app2 >/dev/null && (npx vue-cli-service serve --port 8082 &) && popd >/dev/null
@pushd ./navbar >/dev/null && (npx vue-cli-service serve --port 8080 &) && popd >/dev/null
.PHONY: stop
stop: ## Stop all endpoints
@pkill -2 node