From 97f7970111349021867bb18c2a0513210155904a Mon Sep 17 00:00:00 2001 From: Divyansh Singh <40380293+brc-dd@users.noreply.github.com> Date: Mon, 2 Dec 2024 14:24:06 +0530 Subject: [PATCH] chore: fix patch script for CI --- scripts/patch.ts | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/scripts/patch.ts b/scripts/patch.ts index 011f9ed..55f6e1a 100644 --- a/scripts/patch.ts +++ b/scripts/patch.ts @@ -18,6 +18,14 @@ const n2$D = node2.getMatch('D')!.text() const edit1 = node2.replace(`${n2$A}.use(${n2$D}).use`) const transformed = root.commitEdits([edit1]).toString() +try { + await Deno.mkdir('./vendor', { recursive: true }) +} catch (err) { + if (!(err instanceof Deno.errors.AlreadyExists)) { + throw err + } +} + await Deno.writeTextFile('./vendor/prettier-plugin-markdown.js', transformed) await Deno.writeTextFile( './vendor/prettier-plugin-markdown.d.ts',