deno.land / x / enviromodder@1.0.6 / setup / deps.ts

نووسراو ببینە
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
// From Swifter's Repo
export * as fs from "https://deno.land/std@0.149.0/fs/mod.ts";export * as path from "https://deno.land/std@0.149.0/path/mod.ts";export * as io from "https://deno.land/std@0.149.0/io/mod.ts";export * as streams from "https://deno.land/std@0.149.0/streams/mod.ts";
// adjusted from https://deno.land/x/config_dir@v0.1.1/mod.tsexport function configDir(): string | null { switch (Deno.build.os) { case "linux": { const xdg = Deno.env.get("XDG_CONFIG_HOME"); if (xdg) return xdg;
const home = Deno.env.get("HOME"); if (home) return `${home}/.config`; break; }
case "darwin": { const home = Deno.env.get("HOME"); if (home) return `${home}/Library/Preferences`; break; }
case "windows": return Deno.env.get("APPDATA") ?? null; }
return null;}
enviromodder

Version Info

Tagged at
a year ago