Makefile 504 Bytes
Newer Older
Lukas Burgey's avatar
Lukas Burgey committed
1

Lukas Burgey's avatar
Lukas Burgey committed
2
HOME := /home/feudal
Lukas Burgey's avatar
Lukas Burgey committed
3
DEST := $(HOME)/www
Lukas Burgey's avatar
Lukas Burgey committed
4 5 6
NM := node_modules
NG := $(NM)/.bin/ng

lukas.burgey's avatar
lukas.burgey committed
7
NG_BUILD := $(NG) build --aot --output-path $(DEST)    
Lukas Burgey's avatar
Lukas Burgey committed
8

lukas.burgey's avatar
lukas.burgey committed
9
.PHONY: all, clean, cleaner, dev, watch, prod, watch-prod, $(NM)
Lukas Burgey's avatar
Lukas Burgey committed
10 11 12 13 14 15 16 17 18 19 20 21 22 23

all: prod

clean:
	@rm -rf $(DIST)

cleaner:
	@rm -rf $(NM) $(DIST)

$(NM):
	@npm install

$(NG): $(NM)

Lukas Burgey's avatar
Lukas Burgey committed
24
dev: $(HOME) $(NG)
lukas.burgey's avatar
lukas.burgey committed
25
	$(NG_BUILD)
Lukas Burgey's avatar
Lukas Burgey committed
26

Lukas Burgey's avatar
Lukas Burgey committed
27
watch: $(HOME) $(NG)
lukas.burgey's avatar
lukas.burgey committed
28
	$(NG_BUILD) --watch
Lukas Burgey's avatar
Lukas Burgey committed
29

Lukas Burgey's avatar
Lukas Burgey committed
30
prod: $(HOME) $(NG)
lukas.burgey's avatar
lukas.burgey committed
31
	$(NG_BUILD) --prod
Lukas Burgey's avatar
Lukas Burgey committed
32

Lukas Burgey's avatar
Lukas Burgey committed
33
watch-prod: $(HOME) $(NG)
lukas.burgey's avatar
lukas.burgey committed
34
	$(NG_BUILD) --prod --watch
Lukas Burgey's avatar
Lukas Burgey committed
35

Lukas Burgey's avatar
Lukas Burgey committed
36
$(DEST): $(HOME) prod