forked from fossasia/badgeyay
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
49 lines (34 loc) · 896 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
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
-include .env
BASEDIR = $(realpath .)
API = $(BASEDIR)/api
FRONTEND = $(BASEDIR)/frontend
VIRTUALENV = $(VIRTUAL_ENV)
NODE_MODULES = $(FRONTEND)/node_modules
NODEBINARIES = $(NODE_MODULES)/.bin
PYBINARIES = $(VIRTUALENV)/bin
PYTHON = $(PYBINARIES)/python
PIP = $(PYBINARIES)/pip
HONCHO = $(PYBINARIES)/honcho
NPM ?= npm
BOWER ?= bower
clean.frontend:
rm -rf $(NODE_MODULES)
clean:
make clean.frontend
install:
$(PIP) install --ignore-installed -r $(API)/requirements.txt
$(NPM) --prefix $(FRONTEND) install
$(BOWER) install --config.cwd=$(FRONTEND)
test:
$(NPM) --prefix $(FRONTEND) test
$(NPM) --prefix $(FRONTEND) test --server
lock:
# Lock Dependencies
rm $(API)/requirements.txt
$(PIP) freeze > $(API)/requirements.txt
upgrade:
$(npm) --prefix $(FRONTEND) upgrade
build:
$(NPM) --prefix $(FRONTEND) build
start:
$(HONCHO) start --procfile $(BASEDIR)/Procfile.dev