Continued work
This commit is contained in:
parent
10c84d2dce
commit
3e2ab6ec73
3 changed files with 38 additions and 57 deletions
|
@ -1,6 +1,6 @@
|
|||
import { watch } from "node:fs/promises";
|
||||
import {
|
||||
ValidatedPlaybillSchema,
|
||||
PlaybillSchema,
|
||||
renderPlaybillToHTML,
|
||||
renderPlaybillToJSON,
|
||||
} from "@proscenium/playbill";
|
||||
|
@ -40,7 +40,7 @@ async function processBinding({ inputFilePath, options }: CLIArguments) {
|
|||
const binding = await loadFromBinding(bindingPath);
|
||||
|
||||
// -- VALDATE PLAYBILL -- //
|
||||
const validatedPlaybill = ValidatedPlaybillSchema.safeParse(binding.playbill);
|
||||
const validatedPlaybill = PlaybillSchema.safeParse(binding.playbill);
|
||||
|
||||
if (!validatedPlaybill.success) {
|
||||
console.error("Error validating playbill");
|
||||
|
@ -56,8 +56,8 @@ async function processBinding({ inputFilePath, options }: CLIArguments) {
|
|||
|
||||
let css = "";
|
||||
|
||||
if (binding.html?.styles) {
|
||||
for (const style of binding.html.styles) {
|
||||
if (binding.styles && binding.styles.length > 0) {
|
||||
for (const style of binding.styles) {
|
||||
const cssFilePath = path.resolve(binding.bindingFileDirname, style);
|
||||
const cssFile = Bun.file(cssFilePath);
|
||||
const cssFileExists = await cssFile.exists();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue