diff --git a/tools/deploy/index.ts b/tools/deploy/index.ts index ded1e5bf..4c6a2812 100644 --- a/tools/deploy/index.ts +++ b/tools/deploy/index.ts @@ -36,8 +36,13 @@ program for (const file of files) { const src = pathlib.path(file); - const result = scr.runOnFile(src); - const dst = pathlib.join(outputDir, pathlib.path(src, result)); + const input = pathlib.update(src, {dir: ""}); + const result = scr.runOnFile(input); + if (result === undefined) { + throw new Error(`undefined output on ${file}`); + } + const output = pathlib.path(input, result); + const dst = pathlib.join(outputDir, output); aq.copy(src, dst); }