forked from springload/draftjs_exporter
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
35 lines (25 loc) · 1.28 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
.PHONY: clean-pyc init help test-ci
.DEFAULT_GOAL := help
help: ## See what commands are available.
@grep -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36mmake %-15s\033[0m # %s\n", $$1, $$2}'
init: clean-pyc ## Install dependencies and initialise for development.
pip install -e .[testing,docs] -U
lint: ## Lint the project.
flake8 draftjs_exporter tests example.py setup.py
isort --check-only --diff --recursive draftjs_exporter tests example.py setup.py
test: ## Test the project.
python -m unittest discover
test-watch: ## Restarts the tests whenever a file changes.
nodemon -q -e py -w tests -w draftjs_exporter -x "clear && make test -s || true"
test-coverage: ## Run the tests while generating test coverage data.
coverage run -m unittest discover && coverage report
test-ci: ## Continuous integration test suite.
tox
dev: ## Restarts the example whenever a file changes.
nodemon -q -e py -w tests -w draftjs_exporter -w example.py -x "clear && python example.py || true"
clean-pyc: ## Remove Python file artifacts.
find . -name '*.pyc' -exec rm -f {} +
find . -name '*.pyo' -exec rm -f {} +
find . -name '*~' -exec rm -f {} +
publish: ## Publishes a new version to pypi.
rm dist/* && python setup.py sdist && twine upload dist/*