mirror of
https://github.com/simonw/datasette.git
synced 2025-12-10 16:51:24 +01:00
just prettier, just format shortcuts
This commit is contained in:
parent
4d03e8c12e
commit
4be7eece8c
2 changed files with 16 additions and 0 deletions
7
Justfile
7
Justfile
|
|
@ -36,6 +36,13 @@ export DATASETTE_SECRET := "not_a_secret"
|
||||||
@black:
|
@black:
|
||||||
pipenv run black .
|
pipenv run black .
|
||||||
|
|
||||||
|
# Apply prettier
|
||||||
|
@prettier:
|
||||||
|
npm run fix
|
||||||
|
|
||||||
|
# Format code with both black and prettier
|
||||||
|
@format: black prettier
|
||||||
|
|
||||||
@serve:
|
@serve:
|
||||||
pipenv run sqlite-utils create-database data.db
|
pipenv run sqlite-utils create-database data.db
|
||||||
pipenv run sqlite-utils create-table data.db docs id integer title text --pk id --ignore
|
pipenv run sqlite-utils create-table data.db docs id integer title text --pk id --ignore
|
||||||
|
|
|
||||||
|
|
@ -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.
|
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:
|
.. _contributing_formatting_black:
|
||||||
|
|
||||||
Running Black
|
Running Black
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue