Closed razor-x closed 2 weeks ago
I couldn't find any obvious solution that would format all code blocks across all the markdown files. Instead we can add an option to createBlueprint to accept a function to format the code samples
Added formatCode option to blueprint here: https://github.com/seamapi/blueprint/pull/69
Next step is to implement formatCode
in this repo using https://www.npmjs.com/package/execa. Each syntax will callout to a format command (or for JS, just prettier). If the command is missing, skip formatting. This way, CI can install all the formatters, but they are optional for local development.
How can we do this? GitHub actions as part of the codegen? Let's make a plan before a PR.