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',