2
0

Makefile 706 B

123456789101112131415161718192021222324252627282930
  1. .PHONY: lint format
  2. help:
  3. @echo "lint - check style with black, flake8, sort python with isort, and indent html"
  4. @echo "format - enforce a consistent code style across the codebase and sort python files with isort"
  5. lint-server:
  6. black --target-version py37 --check --diff .
  7. flake8
  8. isort --check-only --diff .
  9. curlylint --parse-only bakerydemo
  10. git ls-files '*.html' | xargs djhtml --check
  11. lint-client:
  12. npm run lint:css --silent
  13. npm run lint:js --silent
  14. npm run lint:format --silent
  15. lint: lint-server lint-client
  16. format-server:
  17. black --target-version py37 .
  18. isort .
  19. git ls-files '*.html' | xargs djhtml -i
  20. format-client:
  21. npm run format
  22. npm run fix:js
  23. format: format-server format-client