use home dir for init
This commit is contained in:
parent
f724fc0ecb
commit
eac55e01c5
5 changed files with 45 additions and 11 deletions
17
lib.ts
Normal file
17
lib.ts
Normal file
|
@ -0,0 +1,17 @@
|
|||
export const environment: "prod" | "dev" = (() => {
|
||||
const arg1 = process.argv[1] || "";
|
||||
|
||||
if (arg1.includes("bunx")) return "prod";
|
||||
|
||||
if (
|
||||
arg1.includes(".bun\\install\\global") ||
|
||||
arg1.includes(".bun/install/global")
|
||||
) {
|
||||
return "prod";
|
||||
}
|
||||
|
||||
return "dev";
|
||||
})();
|
||||
|
||||
export const isProd = environment === "prod";
|
||||
export const isDev = environment === "dev";
|
Loading…
Add table
Add a link
Reference in a new issue