justfile 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. # Default recipe - lists all available recipes
  2. @_default:
  3. just --list
  4. # Run alex linter on README.md to find inconsiderate writing
  5. @alex:
  6. bunx alex README.md
  7. # Install and update dependencies
  8. @bootstrap:
  9. python -m pip install --upgrade pip uv
  10. uv pip install --upgrade --requirement pyproject.toml
  11. # Generate table of contents and build the Zensical site
  12. @build:
  13. just doctoc
  14. uv run zensical build --clean
  15. uv run python scripts/gen_llms.py site
  16. # Generate table of contents for README.md
  17. @doctoc:
  18. bunx doctoc README.md
  19. # Run the template check on every open pull request
  20. @check-prs:
  21. gh workflow run pr-template.yml
  22. # Run the template check on one pull request, for example: just check-pr 388
  23. @check-pr NUMBER:
  24. gh workflow run pr-template.yml -f pull_request={{ NUMBER }}
  25. # Dry run of the template check on every open pull request (logs only, changes nothing)
  26. @check-prs-dry:
  27. gh workflow run pr-template.yml -f dry_run=true
  28. # Dry run of the template check on one pull request, for example: just check-pr-dry 388
  29. @check-pr-dry NUMBER:
  30. gh workflow run pr-template.yml -f pull_request={{ NUMBER }} -f dry_run=true
  31. # Serve the site with live reload on port 8000
  32. @serve:
  33. uv run zensical serve --dev-addr localhost:8000
  34. # Run linting on all files
  35. @lint *ARGS:
  36. # -uv --quiet tool run curlylint _layouts/
  37. # -bunx awesome-lint README.md
  38. uv tool run --with pre-commit-uv pre-commit run {{ ARGS }} --all-files
  39. # Remove the generated site
  40. @clean:
  41. rm -rf site