-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
40 lines (31 loc) · 968 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
export DJANGO_SETTINGS_MODULE=backend.settings
# Initializes virtual environment with basic requirements.
prod:
pip install -r requirements.txt
npm install --production
# Installs development requirements.
dev:
pip install -r requirements.txt
npm install
# Runs development server.
# This step depends on `make dev`, however dependency is excluded to speed up dev server startup.
run:
npm run dev & python ./manage runserver
# Creates migrations and migrates database.
# This step depends on `make dev`, however dependency is excluded to speed up dev server startup.
migrate:
python ./manage makemigrations
python ./manage migrate
# Builds files for distribution which will be placed in /static/dist
build: prod migrate
npm run build
# Cleans up folder by removing virtual environment, node modules and generated files.
clean:
rm -rf node_modules
rm -rf static/dist
# Run linter
lint:
@npm run lint --silent
# Run tests
test:
python ./manage test