first
This commit is contained in:
commit
8538ab969a
434 changed files with 44051 additions and 0 deletions
3
packages/utils/biome.json
Normal file
3
packages/utils/biome.json
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
{
|
||||
"extends": ["../../biome.json"]
|
||||
}
|
||||
1
packages/utils/index.ts
Normal file
1
packages/utils/index.ts
Normal file
|
|
@ -0,0 +1 @@
|
|||
export * from "./lib/base-url";
|
||||
9
packages/utils/lib/base-url.ts
Normal file
9
packages/utils/lib/base-url.ts
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
export function getBaseUrl() {
|
||||
if (process.env.NEXT_PUBLIC_SITE_URL) {
|
||||
return process.env.NEXT_PUBLIC_SITE_URL;
|
||||
}
|
||||
if (process.env.NEXT_PUBLIC_VERCEL_URL) {
|
||||
return `https://${process.env.NEXT_PUBLIC_VERCEL_URL}`;
|
||||
}
|
||||
return `http://localhost:${process.env.PORT ?? 3000}`;
|
||||
}
|
||||
14
packages/utils/package.json
Normal file
14
packages/utils/package.json
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
{
|
||||
"devDependencies": {
|
||||
"@biomejs/biome": "1.9.4",
|
||||
"@types/node": "^22.15.30",
|
||||
"@repo/tsconfig": "workspace:*"
|
||||
},
|
||||
"main": "./index.ts",
|
||||
"name": "@repo/utils",
|
||||
"scripts": {
|
||||
"type-check": "tsc --noEmit"
|
||||
},
|
||||
"types": "./**/.tsx",
|
||||
"version": "0.0.0"
|
||||
}
|
||||
5
packages/utils/tsconfig.json
Normal file
5
packages/utils/tsconfig.json
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
{
|
||||
"extends": "@repo/tsconfig/base.json",
|
||||
"include": ["**/*.ts"],
|
||||
"exclude": ["dist", "build", "node_modules"]
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue