better project setup

main
Benjamin Kraft 2 years ago
parent 486e5863cb
commit ee1dadecc3
  1. 9
      package.json
  2. 5
      src/index.ts
  3. 15
      tsconfig.json

@ -2,13 +2,8 @@
"name": "game-server", "name": "game-server",
"version": "2.0", "version": "2.0",
"private": true, "private": true,
"exports": { "main": "out/index.js",
".": "./out/index.js", "types": "out/index.d.ts",
"./room": "./out/room.js",
"./server-game": "./out/game_standard.js",
"./client": "./out/client.js",
"./logger": "./out/logger.js"
},
"dependencies": { "dependencies": {
"dotenv": "^16.0.3", "dotenv": "^16.0.3",
"https": "^1.0.0", "https": "^1.0.0",

@ -38,3 +38,8 @@ export function GameServer(useP2P: boolean){
log('startup', null, null, 'Server is listening on port ' + httpsPort); log('startup', null, null, 'Server is listening on port ' + httpsPort);
} }
export {Room} from "./room"
export {log} from "./logger"
export {Client} from "./client"
export {ServerGame} from "./game_standard"

@ -1,16 +1,19 @@
{ {
"compilerOptions": { "compilerOptions": {
"target": "ES2022", "target": "ESNext",
"module": "commonjs", "module": "ESNext",
"sourceMap": true, "moduleResolution": "NodeNext",
"esModuleInterop": true,
"alwaysStrict": true, "alwaysStrict": true,
"removeComments": true, "removeComments": true,
"declaration": true, "declaration": true,
"declarationMap": true, "declarationMap": true,
"outDir": "./out", "sourceMap": true,
"moduleResolution": "Node16" "outDir": "./out"
}, },
"include": [ "include": [
"./src" "src/**/*.ts"
] ]
} }
Loading…
Cancel
Save