mix dextrin.format (Dextrin v0.3.0)

Copy Markdown View Source
$ mix dextrin.format data.dxn --mode pretty
$ mix dextrin.format data.dxn --mode condense
$ mix dextrin.format data.dxn --mode pretty --in-place

Defaults to --mode pretty. --in-place rewrites PATH; otherwise prints to stdout.

--mode pretty keeps every comment beside the entry it belongs to (Dextrin.Document.format/2): it changes layout only, so every token is written as it was. --mode condense drops them: a comment ends its line, and condensed output is one line -- it reprints the value (Dextrin.encode/2).