just prettier, just format shortcuts

This commit is contained in:
Simon Willison 2025-10-25 09:04:04 -07:00
commit 4be7eece8c
2 changed files with 16 additions and 0 deletions

View file

@ -36,6 +36,13 @@ export DATASETTE_SECRET := "not_a_secret"
@black:
pipenv run black .
# Apply prettier
@prettier:
npm run fix
# Format code with both black and prettier
@format: black prettier
@serve:
pipenv run sqlite-utils create-database data.db
pipenv run sqlite-utils create-table data.db docs id integer title text --pk id --ignore

View file

@ -131,6 +131,15 @@ These formatters are enforced by Datasette's continuous integration: if a commit
When developing locally, you can verify and correct the formatting of your code using these tools.
If you are using `Just <https://github.com/casey/just>`__ the quickest way to run these is like so::
just black
just prettier
Or run both at the same time::
just format
.. _contributing_formatting_black:
Running Black