From 54f6785dbd034553c57dc9e2b15e99e7ff0950a4 Mon Sep 17 00:00:00 2001 From: liushuyu Date: Fri, 7 Oct 2022 02:56:29 -0600 Subject: [PATCH] deno: add task definitions --- .gitignore | 1 + deno.json | 5 +++++ server.js | 4 +++- 3 files changed, 9 insertions(+), 1 deletion(-) create mode 100644 deno.json diff --git a/.gitignore b/.gitignore index c8aaefa..6c5b472 100644 --- a/.gitignore +++ b/.gitignore @@ -61,3 +61,4 @@ typings/ # bundled JS *.bundle.js +*.min.js diff --git a/deno.json b/deno.json new file mode 100644 index 0000000..b2a2af5 --- /dev/null +++ b/deno.json @@ -0,0 +1,5 @@ +{ + "tasks": { + "bundle": "deno bundle server.js -- server.bundle.js" + } +} \ No newline at end of file diff --git a/server.js b/server.js index 3b6e75e..fcc2bce 100644 --- a/server.js +++ b/server.js @@ -57,7 +57,6 @@ function getTopResultFor(jsonData, platform) { return { notFound: true }; } -const zipBin = await check7z(); // The Qt Installer Framework is a pain to build or download. // Because all we need are a few 7-zipped + xml files, we might as well generate them for ourselves. const targets = [ @@ -100,6 +99,7 @@ const targets = [ ]; async function execute() { + const zipBin = await check7z(); // Clean up any temporary directories. try { await Deno.remove(tempDir, { recursive: true }); @@ -236,6 +236,8 @@ async function execute() { "No Citra binary release updates are available for the Updates.xml -- nothing to do." ); } + + await Deno.remove(tempDir, { recursive: true }); } execute().catch((err) => {