-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
30 lines (25 loc) · 728 Bytes
/
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
build:
sudo docker build . -t 'imgxplain'
-sudo docker rm imgxplain
sudo docker create --name 'imgxplain' imgxplain
sudo docker cp imgxplain:/app/public/dist/ public/
sudo docker rm imgxplain
format:
sudo docker run --rm -i -t -v $(PWD):/app -w /app/ node:14.5.0-alpine3.11 \
/bin/sh -c 'npm run format'
run: build
-sudo docker rm -f nginx
sudo docker run --rm -it --name nginx -p 8080:80 -v $(PWD)/public:/usr/share/nginx/html/ nginx:1.17.8-alpine
run_continuous:
while inotifywait -e close_write \
$(PWD)/src/*.ts \
$(PWD)/src/**/*.ts \
$(PWD)/public/css/*.css \
$(PWD)/public/index.html; \
do \
make run; \
done
clean_build:
sudo rm -rf public/dist/
clean: clean_build
sudo rm -rf node_modules/