-
Notifications
You must be signed in to change notification settings - Fork 6
/
Makefile
55 lines (45 loc) · 1.16 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
NPM=npm
YARN=yarn
NODE=node
VERSION=1.10.2
APP=dynamodb-dashboard
# hub.docker.com
USERNAME=kritishdhaubanjar
# registry
VERDACCIO_REGISTRY=http://localhost:4873
VERDACCIO_STORAGE=~/.local/share/verdaccio/storage/$(APP)
all: clean install
export NODE_ENV=production
cd ./app && $(YARN) build-only
cd ./server && $(YARN) build
cp -r ./app/dist ./server/build/public
install:
cd ./app && $(YARN)
cd ./server && $(YARN)
clean:
rm -rf ./app/dist
rm -rf ./server/build
rm -rf ./app/node_modules
rm -rf ./server/node_modules
start: all
$(NODE) ./server/build/bin/cli.js start -o
publish: all
rm ./server/README.md
cp ./README.md ./server/README.md
cd ./server && $(NPM) publish --dry-run
docker:
docker build . -t $(USERNAME)/dynamodb-dashboard:$(VERSION)
docker build . -t $(USERNAME)/dynamodb-dashboard:latest
# development
.server:
cd ./server && $(YARN) dev
.app:
cd ./app && $(YARN) dev
watch: install
make -j 2 .server .app
# registry (experimental)
verdaccio: publish
rm -rf $(VERDACCIO_STORAGE)
$(NPM) --global uninstall $(APP)
cd ./server && $(NPM) publish --registry $(VERDACCIO_REGISTRY)
$(NPM) --global install $(APP) --registry $(VERDACCIO_REGISTRY)