chore: update build scripts to use rimraf for cleaning dist directory and add rimraf as a dependency in relevant package.json files

This commit is contained in:
Mauricio Siu
2026-02-24 23:17:14 -06:00
parent b8bfee7f87
commit 234862e5b6
6 changed files with 64 additions and 8 deletions

View File

@@ -4,7 +4,7 @@
"type": "module",
"scripts": {
"dev": "PORT=4000 tsx watch src/index.ts",
"build": "tsc --project tsconfig.json",
"build": "rimraf dist && tsc --project tsconfig.json",
"start": "node dist/index.js",
"typecheck": "tsc --noEmit"
},
@@ -26,6 +26,7 @@
"@types/node": "^24.4.0",
"@types/react": "^18.2.37",
"@types/react-dom": "^18.2.15",
"rimraf": "6.1.3",
"tsx": "^4.16.2",
"typescript": "^5.8.3"
},

View File

@@ -3,7 +3,7 @@
"type": "module",
"scripts": {
"dev": "PORT=4001 tsx watch src/index.ts",
"build": "tsc --project tsconfig.json",
"build": "rimraf dist && tsc --project tsconfig.build.json",
"start": "node dist/index.js",
"typecheck": "tsc --noEmit"
},
@@ -23,9 +23,10 @@
"zod": "^4.3.6"
},
"devDependencies": {
"rimraf": "6.1.3",
"@types/node": "^24.4.0",
"@types/react": "^18.3.5",
"@types/react-dom": "^18.3.0",
"@types/react": "^18.2.37",
"@types/react-dom": "^18.2.15",
"tsx": "^4.16.2",
"typescript": "^5.8.3"
},

View File

@@ -0,0 +1,8 @@
{
"extends": "./tsconfig.json",
"compilerOptions": {
"rootDir": "./src",
"paths": {}
},
"include": ["src/**/*"]
}

View File

@@ -7,11 +7,12 @@
"skipLibCheck": true,
"outDir": "dist",
"jsx": "react-jsx",
"jsxImportSource": "hono/jsx",
"declaration": false,
"baseUrl": ".",
"paths": {
"@dokploy/server/*": ["../../packages/server/src/*"]
}
},
"exclude": ["node_modules", "dist"]
"exclude": ["node_modules", "dist"],
"include": ["src/**/*"]
}

View File

@@ -19,11 +19,11 @@
}
},
"scripts": {
"build": "npm run switch:prod && rm -rf ./dist && tsc --project tsconfig.server.json && tsc-alias -p tsconfig.server.json",
"build": "npm run switch:prod && rimraf dist && tsc --project tsconfig.server.json && tsc-alias -p tsconfig.server.json",
"build:types": "tsc --emitDeclarationOnly --experimenta-dts",
"switch:dev": "node scripts/switchToSrc.js",
"switch:prod": "node scripts/switchToDist.js",
"dev": "rm -rf ./dist && pnpm esbuild && tsc --emitDeclarationOnly --outDir dist -p tsconfig.server.json",
"dev": "rimraf dist && pnpm esbuild && tsc --emitDeclarationOnly --outDir dist -p tsconfig.server.json",
"esbuild": "tsx ./esbuild.config.ts && tsc --project tsconfig.server.json --emitDeclarationOnly ",
"typecheck": "tsc --noEmit",
"dbml:generate": "npx tsx src/db/schema/dbml.ts",
@@ -86,6 +86,7 @@
"better-call": "1.3.2"
},
"devDependencies": {
"rimraf": "6.1.3",
"@better-auth/cli": "1.5.0-beta.13",
"@types/semver": "7.7.1",
"@types/adm-zip": "^0.5.7",

44
pnpm-lock.yaml generated
View File

@@ -80,6 +80,9 @@ importers:
'@types/react-dom':
specifier: 18.3.0
version: 18.3.0
rimraf:
specifier: 6.1.3
version: 6.1.3
tsx:
specifier: ^4.16.2
version: 4.16.2
@@ -571,6 +574,9 @@ importers:
'@types/react-dom':
specifier: 18.3.0
version: 18.3.0
rimraf:
specifier: 6.1.3
version: 6.1.3
tsx:
specifier: ^4.16.2
version: 4.16.2
@@ -803,6 +809,9 @@ importers:
postcss:
specifier: ^8.5.3
version: 8.5.6
rimraf:
specifier: 6.1.3
version: 6.1.3
tailwindcss:
specifier: ^3.4.17
version: 3.4.19(tsx@4.16.2)(yaml@2.8.1)
@@ -5583,6 +5592,10 @@ packages:
deprecated: Old versions of glob are not supported, and contain widely publicized security vulnerabilities, which have been fixed in the current version. Please update. Support for old versions may be purchased (at exorbitant rates) by contacting i@izs.me
hasBin: true
glob@13.0.6:
resolution: {integrity: sha512-Wjlyrolmm8uDpm/ogGyXZXb1Z+Ca2B8NbJwqBVg0axK9GbBeoS7yGV6vjXnYdGm6X53iehEuxxbyiKp8QmN4Vw==}
engines: {node: 18 || 20 || >=22}
glob@7.2.3:
resolution: {integrity: sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==}
deprecated: Old versions of glob are not supported, and contain widely publicized security vulnerabilities, which have been fixed in the current version. Please update. Support for old versions may be purchased (at exorbitant rates) by contacting i@izs.me
@@ -6152,6 +6165,10 @@ packages:
lru-cache@10.4.3:
resolution: {integrity: sha512-JNAzZcXrCt42VGLuYz0zfAzDfAvJWW6AfYlDBQyDV5DClI2m5sAmK+OIO7s59XfsRsWHp02jAJrRadPRGTt6SQ==}
lru-cache@11.2.6:
resolution: {integrity: sha512-ESL2CrkS/2wTPfuend7Zhkzo2u0daGJ/A2VucJOgQ/C48S/zB8MMeMHSGKYpXhIjbPxfuezITkaBH1wqv00DDQ==}
engines: {node: 20 || >=22}
lru-cache@5.1.1:
resolution: {integrity: sha512-KpNARQA3Iwv+jTA0utUVVbrh+Jlrr1Fv0e56GGzAFOXN7dk/FviaDW8LHmK52DlcH4WP2n6gI8vN1aesBFgo9w==}
@@ -6693,6 +6710,10 @@ packages:
resolution: {integrity: sha512-Xa4Nw17FS9ApQFJ9umLiJS4orGjm7ZzwUrwamcGQuHSzDyth9boKDaycYdDcZDuqYATXw4HFXgaqWTctW/v1HA==}
engines: {node: '>=16 || 14 >=14.18'}
path-scurry@2.0.2:
resolution: {integrity: sha512-3O/iVVsJAPsOnpwWIeD+d6z/7PmqApyQePUtCndjatj/9I5LylHvt5qluFaBT3I5h3r1ejfR056c+FCv+NnNXg==}
engines: {node: 18 || 20 || >=22}
path-type@4.0.0:
resolution: {integrity: sha512-gDKb8aZMDeD/tZWs9P6+q0J9Mwkdl6xMV8TjnGP3qJVJ06bdMgkbBlLU8IdfOsIsFz2BW1rNVT3XuNEl8zPAvw==}
engines: {node: '>=8'}
@@ -7292,6 +7313,11 @@ packages:
deprecated: Rimraf versions prior to v4 are no longer supported
hasBin: true
rimraf@6.1.3:
resolution: {integrity: sha512-LKg+Cr2ZF61fkcaK1UdkH2yEBBKnYjTyWzTJT6KNPcSPaiT7HSdhtMXQuN5wkTX0Xu72KQ1l8S42rlmexS2hSA==}
engines: {node: 20 || >=22}
hasBin: true
rollup@4.59.0:
resolution: {integrity: sha512-2oMpl67a3zCH9H79LeMcbDhXW/UmWG/y2zuqnF2jQq5uq9TbM9TVyXvA4+t+ne2IIkBdrLpAaRQAvo7YI/Yyeg==}
engines: {node: '>=18.0.0', npm: '>=8.0.0'}
@@ -13413,6 +13439,12 @@ snapshots:
package-json-from-dist: 1.0.1
path-scurry: 1.11.1
glob@13.0.6:
dependencies:
minimatch: 10.2.2
minipass: 7.1.3
path-scurry: 2.0.2
glob@7.2.3:
dependencies:
fs.realpath: 1.0.0
@@ -14046,6 +14078,8 @@ snapshots:
lru-cache@10.4.3: {}
lru-cache@11.2.6: {}
lru-cache@5.1.1:
dependencies:
yallist: 3.1.1
@@ -14675,6 +14709,11 @@ snapshots:
lru-cache: 10.4.3
minipass: 7.1.3
path-scurry@2.0.2:
dependencies:
lru-cache: 11.2.6
minipass: 7.1.3
path-type@4.0.0: {}
pathe@2.0.3: {}
@@ -15304,6 +15343,11 @@ snapshots:
dependencies:
glob: 7.2.3
rimraf@6.1.3:
dependencies:
glob: 13.0.6
package-json-from-dist: 1.0.1
rollup@4.59.0:
dependencies:
'@types/estree': 1.0.8