Add option to compile markdown

This commit is contained in:
Endeavorance 2025-03-21 14:58:26 -04:00
parent e7218143ec
commit c1f3c6cade
7 changed files with 62 additions and 237 deletions

View file

@ -1,6 +1,12 @@
import { watch } from "node:fs/promises";
import chalk from "chalk";
import { CLIError, MuseError, loadFromBinding, resolveBindingPath } from "#lib";
import {
CLIError,
MuseError,
compileMarkdownInPlaybill,
loadFromBinding,
resolveBindingPath,
} from "#lib";
import { renderPlaybillToHTML } from "#render/html";
import {
type CLIArguments,
@ -30,6 +36,9 @@ async function processBinding({ inputFilePath, options }: CLIArguments) {
switch (options.renderer) {
case "json":
if (options.markdown) {
await compileMarkdownInPlaybill(binding);
}
serializedPlaybill = binding.playbill.serialize();
break;
case "html":