From df31bfe393c34d0f8e4512b73a8d275b2b99a191 Mon Sep 17 00:00:00 2001 From: Paolo Brasolin <paolo.brasolin@eurac.edu> Date: Thu, 24 Feb 2022 13:54:50 +0100 Subject: [PATCH] feat: #be cleanup package and TS cfg --- backend/package.json | 3 ++- backend/tsconfig.json | 20 ++++++++++++++------ 2 files changed, 16 insertions(+), 7 deletions(-) diff --git a/backend/package.json b/backend/package.json index 6c4c505..03cde72 100644 --- a/backend/package.json +++ b/backend/package.json @@ -4,8 +4,9 @@ "description": "Ötzi game backend.", "main": "src/index.js", "scripts": { - "serve": "nodemon src/index.ts", "build": "tsc", + "start": "NODE_PATH=./dist node dist/index.js", + "serve": "nodemon src/index.ts", "lint:check": "eslint .", "lint:fix": "eslint . --fix", "format:check": "prettier . --check", diff --git a/backend/tsconfig.json b/backend/tsconfig.json index 6ce8041..8de0c07 100644 --- a/backend/tsconfig.json +++ b/backend/tsconfig.json @@ -1,13 +1,21 @@ { "compilerOptions": { + /* Visit https://aka.ms/tsconfig.json to read more about this file */ + + // Node 16 recommendations -- https://github.com/tsconfig/bases/blob/main/bases/node16.json + "lib": ["ES2021"], "module": "commonjs", - "target": "es6", - "declaration": true, - "lib": ["ES6", "DOM"], - "outDir": "dist", - "rootDir": "src", + "target": "ES2021", "strict": true, - "typeRoots": ["./node_modules/@types"] + "esModuleInterop": true, + "skipLibCheck": true, + "forceConsistentCasingInFileNames": true, + + // Customization + //"moduleResolution": "node", + "rootDir": "./src", + "baseUrl": "./src", + "outDir": "./dist" }, "include": ["src/**/*"], "exclude": ["src/**/*.spec.ts"] -- GitLab