Makefile 733 B

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