Playground: doc explorer (#10183)

This commit is contained in:
Georgii Dolzhykov authored and GitHub committed 2022-07-23 22:46:16 +03:00
1 parent ab72a2c11c
commit b65cb6c1f6
13 files changed
+217 -24

No files matched your search

+2
View File
@@ -9,4 +9,6 @@ The basic idea is that the printer takes an AST and returns an intermediate repr
This means that most of the logic of printing an AST involves generating an abstract representation of the output involving certain commands. For example, `["(", line, arg, line, ")"]` would represent a concatenation of opening parens, an argument, and closing parens. But if that doesn’t fit on one line, the printer can break where `line` is specified.
The [Playground](https://prettier.io/playground) has a special mode for exploring how Prettier’s intermediate representation is printed. To get there, open the sidebar (the "Show options" button) and set the `parser` option to the special value `doc-explorer`.
More (rough) details can be found in [commands.md](https://github.com/prettier/prettier/blob/main/commands.md).