chore: add server build script

This commit is contained in:
moonrailgun 2023-10-15 00:02:23 +08:00
parent f7dc8c569f
commit 9114c2064c
3 changed files with 15 additions and 2 deletions

View File

@ -5,10 +5,12 @@
"scripts": {
"dev": "nodemon",
"start": "NODE_ENV=production ts-node src/server/main.ts",
"build": "vite build && pnpm build:tracker && pnpm build:geo",
"build": "pnpm build:client && pnpm build:server && pnpm build:tracker && pnpm build:geo",
"build:client": "vite build",
"build:server": "tsc -p tsconfig.server.json",
"build:tracker": "ts-node scripts/build-tracker.ts",
"build:geo": "ts-node scripts/build-geo.ts",
"check:type": "tsc --noEmit --skipLibCheck --jsx react-jsx --module esnext",
"check:type": "tsc --noEmit --skipLibCheck --module esnext",
"db:push": "prisma db push",
"db:generate": "prisma generate",
"db:studio": "prisma studio"

View File

@ -14,6 +14,7 @@
"resolveJsonModule": true,
"isolatedModules": true,
"noEmit": true,
"jsx": "react-jsx"
},
"include": ["src", "types"]
}

10
tsconfig.server.json Normal file
View File

@ -0,0 +1,10 @@
{
"extends": "./tsconfig.json",
"include": ["./src/server/**/*.ts", "./src/shared/**/*.ts", "./src/types/**/*.ts"],
"exclude": ["node_modules/**/*", "dist"],
"compilerOptions": {
"rootDirs": ["./", "../"],
"outDir": "./dist",
"noEmit": false
}
}