-
Notifications
You must be signed in to change notification settings - Fork 1
/
Justfile
55 lines (41 loc) · 1.13 KB
/
Justfile
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
setup:
@echo "Installing necessary stuff"
npm install -g elm gulp --no-bin-links
# ----------------- DEV ------------------ #
# Build rust server and frontend application
dev-build: dev-build-server dev-build-frontend
@echo "Finished building everything"
# Build rust server only
dev-build-server:
@echo "Building server code"
cargo build
# Build elm frontend only
dev-build-frontend:
@echo "Building fontend code"
gulp build
# Run a development server and watch for changes
dev-run:
@echo "Starting up the server"
# TODO: gulp watch without blocking cargo run
cargo run
# TODO: Watch for changes
# ----------------- PROD ------------------ #
prod-build: prod-build-server prod-build-frontend
prod-build-server:
@echo "Building server code"
cargo build --release
prod-build-frontend:
@echo "Building fronend code"
gulp build
# ----------------- GENERAL ------------------ #
# Cleanup all builds
clean-all: clean-server clean
@echo "Finished cleanup"
# Only clean server files
clean-server:
@echo "Cleaning up server build"
rm -rf target
# Only clean frontend stuff
clean:
@echo "Cleaning up frontend build"
rm -rf public