-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
68 lines (55 loc) · 2.19 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
57
58
59
60
61
62
63
64
65
66
67
68
default:
@echo "Mark.se CLI"
@echo ""
@echo "Usage:"
@echo "== Project =="
@echo "\tmake init # Initializes a fresh project with new .env variables, dependency installations, images, services, and built frontends"
@echo "\tmake init_setup # Initializes fresh .env variables and installs all node dependencies in the project"
@echo "\tmake init_start_project # Initializes all frontends in the project and any related images and services"
@echo "\tmake clear_project # Deletes all .env files and installed node dependencies in the project"
@echo ""
@echo "=== Files ==="
@echo "\tmake setup_envs # Copies all .env.example files as .env where .env doesn't exist"
@echo "\tmake delete_envs # Deletes all .env files from packages"
@echo "\tmake install_deps # Installs all node dependencies required for project"
@echo "\tmake delete_deps # Deletes all node dependencies required for project"
@echo ""
@echo "=== Containers ==="
@echo ""
@echo "=== Databases ==="
@echo ""
@echo "=== Builds ==="
@echo "\tmake build_frontends # Builds the frontend of all apps"
@echo "\tmake build_weather_ly # Builds the frontend to the weather.ly app"
@echo ""
@echo "=== Services ==="
# Project
init: init_setup init_start_project
init_setup: delete_envs setup_envs install_deps
init_start_project: build_frontends
clear_project: delete_deps delete_envs
# Files
setup_envs:
@echo "Generating .env files from .env.example files..."
find ./packages -name ".env.example" -exec dirname {} \; | exargs -t -I % cp -n %/.env.example %/.env
delete_envs:
@echo "Deleting all .env files from project..."
fing .packages -name ".env" | exargs -t -r -n 1 rm
install_deps:
@echo "Installing all dependencies in project..."
yarn
@while read p; do \
echo "Installing dependencies for $$p ..."; \
cd "$$p" && yarn && cd $$(git rev-parse --show-toplevel); \
done <packages-list.txt
delete_deps:
@echo "Deleting all dependencies from project..."
find . -type d -name 'node_modules' -prune -exec rm -Rf '{}' +
# Containers
# Databases
# Builds
build_weather_ly:
@echo "Building cad.se..."
cd ./packages/app/ui; yarn build
build_frontends: build_cad_se
# Services