deno: add task definitions

This commit is contained in:
liushuyu 2022-10-07 02:56:29 -06:00
parent f639faba8e
commit 54f6785dbd
No known key found for this signature in database
GPG Key ID: 23D1CE4534419437
3 changed files with 9 additions and 1 deletions

1
.gitignore vendored
View File

@ -61,3 +61,4 @@ typings/
# bundled JS
*.bundle.js
*.min.js

5
deno.json Normal file
View File

@ -0,0 +1,5 @@
{
"tasks": {
"bundle": "deno bundle server.js -- server.bundle.js"
}
}

View File

@ -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) => {