Boilerplate generator and deno tasks for monorepo

This commit is contained in:
Emma
2023-05-01 20:28:18 -06:00
parent a367562ba0
commit a910783882
36 changed files with 1164 additions and 47 deletions

15
lib/fileExists.ts Normal file
View File

@@ -0,0 +1,15 @@
export const fileExists = async (path: string) => {
try {
await Deno.stat(path);
return true;
} catch (error) {
if (error instanceof Deno.errors.NotFound) {
// file or directory does not exist
// console.log(error);
return false;
} else {
// unexpected error, maybe permissions, pass it along
throw error;
}
}
}