Add option to compile markdown
This commit is contained in:
parent
e7218143ec
commit
c1f3c6cade
7 changed files with 62 additions and 237 deletions
11
src/index.ts
11
src/index.ts
|
@ -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":
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue