-
Notifications
You must be signed in to change notification settings - Fork 448
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Generate badges only that are required on a page * Fix codacy * Add Makefile and honcho to start devlopment server and app with a single make command! * Add honcho in dependencies * Add bower install command * Add make test for frontend tests
- Loading branch information
Showing
4 changed files
with
53 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
web: gunicorn --pythonpath api/ run:app | ||
node: npm --prefix frontend/ start |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters