A pretty printer library for Motoko.
Ported from purescript-dodo-printer.
All credit goes to Nathan Faubion
More examples are coming, but for now there's a basic Json printer in test/JsonExample.mo to
give you an idea.
You can run it with make -C test json.
- Write your library code in
*.mosource files in thesrc/directory. - Run
make checkto make sure your changes compile (or use the VSCode extension to get quicker feedback) - Add tests to the source files in the
test/directory, and run them withmake test. The project template is set up to include motoko-matchers. - Generate API documentation locally by running
make docsand then open the resultingdocs/index.htmlin your browser
API documentation for this library can be found at https://kritzcreek.github.io/motoko-pretty
motoko-pretty is distributed under the terms of the Apache License (Version 2.0).
See LICENSE for details.