Skip to content

kritzcreek/motoko-pretty

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

motoko-pretty

A pretty printer library for Motoko.

Ported from purescript-dodo-printer.

All credit goes to Nathan Faubion

Examples

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.

How to develop

  • Write your library code in *.mo source files in the src/ directory.
  • Run make check to 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 with make test. The project template is set up to include motoko-matchers.
  • Generate API documentation locally by running make docs and then open the resulting docs/index.html in your browser

API Documentation

API documentation for this library can be found at https://kritzcreek.github.io/motoko-pretty

License

motoko-pretty is distributed under the terms of the Apache License (Version 2.0).

See LICENSE for details.