You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Support multiple input/output file/directory pairs.
Previously, mdoc only supported a single --in and --out argument and
they both had to be directories. Now, users can specify a list of
--in and --out arguments of both files and directories.
This change enables nice use-cases like generating a single `readme.md`
file in the root directory of a git repo or generating the blog
directory of a Docusaurus website.
```
mdoc --in readme.template.md --out readme.md
mdoc --in docs --out website/target/docs --in blog --out website/blog
```
This change turned out to be tricky to implement:
* the public API for custom modifiers needs to correctly handle the case
when --in and --out are files. For example, the Scala.js modifier needs
to be able to know where to generate JavaScript files.
* we need to report helpful and actionable error messages when
validating user input. For example, it's not valid to pair an input
directory with an output file.
0 commit comments