What is it?
A source code formatter for PureScript.
You can install the npm package
npm install purty
Binaries are available from Bintray
You can format a file by invoking
purty with the path to the file.
For instance, if you had a
Main module in a
src directory, you could say:
This will write the formatted module to STDOUT.
If you'd like to format the module and write it back to the same file, you can use the
purty --write src/Main.purs
This will write the formatted module to
A listing of all available options can be shown with the
You can configure most options with a Dhall file.
The file must be named
.purty.dhall and it must be in the directory where you're invoking
Since the configuration is a Dhall file, all of the guarantees and power of Dhall is available. You can reference any other Dhall file on the internet, you can compute the values, you can type the configuration, etc.
How does it format?
For examples of how
purty formats, see the golden tests.