djLint/docs/djlint/usage.rst
2021-07-29 13:41:34 -05:00

54 lines
1.1 KiB
ReStructuredText

Getting Started
================
Installation from `Pypi <https://pypi.org/project/djlint/>`__
--------------------------------------------------------------
.. code:: sh
pip install djlint
Linter Usage
------------
.. code:: sh
djlint src # file or path
# with custom extensions
djlint src -e html.dj
Reformatter Usage
-----------------
Reforamtting is a beta product. Check the output before applying changes.
Reformatting does not work with long json/html embedded into attribute data.
To check what may change in formatting run:
.. code:: sh
djlint src --check
To reformat run:
.. code:: sh
djlint src --reformat
CLI Args
-------------
.. code:: sh
Usage: djlint [OPTIONS] SRC ...
Djlint django template files.
Options:
-e, --extension TEXT File extension to lint [default: html]
--reformat Reformat the file(s).
--check Check formatting on the file(s).
--quiet Do not print diff when reformatting.
-h, --help Show this message and exit.