forked from Lissy93/awesome-privacy
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
60 lines (47 loc) · 2.25 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
56
57
58
59
60
#########################################################################
# Welcome to Awesome Privacy! #
# This file contains all the commands for the project (in lib and web) #
# #
# lib commands: #
# make install_lib_deps - Install Python dependencies for lib/ #
# make validate - Validates awesome-privacy.yml against the schema #
# make gen_readme - Generate README.md from awesome-privacy.yml #
# #
# web commands: #
# make install_web_deps - Install NPM dependencies for the website #
# make build_web - Build the static website (outputs to web/dist/) #
# make start_web - Starts a webserver to serve the static website #
# #
# For further documentation, please reference the GitHub repository. #
# https://github.com/lissy93/awesome-privacy or awesome-privacy.xyz #
# #
#########################################################################
# Licensed under CC0-1.0 (C) Alicia Sykes <https://aliciasykes.com> #
#########################################################################
# Targets
.PHONY: all \
install_lib_deps gen_readme validate lib \
install_web_deps build_web start_web web
# Get Python bin
PYTHON := $(shell which python3 2>/dev/null || which python)
# Directory Locations
LIB_DIR := lib
WEB_DIR := web
# Targets for lib/
install_lib_deps:
$(PYTHON) -m pip install -r $(LIB_DIR)/requirements.txt
gen_readme: install_lib_deps
$(PYTHON) $(LIB_DIR)/awesome-privacy-readme-gen.py
validate: install_lib_deps
$(PYTHON) $(LIB_DIR)/validate-awesome-privacy.py
lib: install_lib_deps validate gen_readme
# Targets for web/
install_web_deps:
cd $(WEB_DIR) && yarn install
build_web: install_web_deps
cd $(WEB_DIR) && yarn build
start_web: build_web
cd $(WEB_DIR) && yarn start
dev_web: install_web_deps
cd $(WEB_DIR) && yarn dev
web: install_web_deps build_web start_web