DenReg/registry/src/registry.ts

19 lines
335 B
TypeScript
Raw Normal View History

2020-07-28 12:39:54 +00:00
const ensureDir = async (name: string) => {
if (
!(await Deno.stat(name)
.then(() => true)
.catch(() => false))
) {
await Deno.mkdir(name);
}
};
try {
await Deno.remove("./tmp", { recursive: true });
} catch (err) {}
await ensureDir("./tmp");
await ensureDir("./data");
import "./http.ts";