From 00fbc813accb3340a71773a3a0a31b6bc2474a4e Mon Sep 17 00:00:00 2001 From: TheSparta Date: Mon, 6 Nov 2023 19:39:13 +0000 Subject: [PATCH] fix/profiler (!166) - `run:profiler` now uses swc instead of tsc. - Removed `tsconfig.test.json` as it was only being used for the profiler which is now using swc. - simplified `tsconfig.json` and `tsconfig.typedef.json`, they both had `baseUrl` and `paths` set to the same values, so i just moved them to `tsconfig.base.json` Reviewed-on: https://dev.sp-tarkov.com/SPT-AKI/Server/pulls/166 Co-authored-by: TheSparta Co-committed-by: TheSparta --- project/gulpfile.mjs | 8 ++------ project/tsconfig.base.json | 8 +++++++- project/tsconfig.json | 8 +------- project/tsconfig.test.json | 13 ------------- project/tsconfig.typedef.json | 8 +------- 5 files changed, 11 insertions(+), 34 deletions(-) delete mode 100644 project/tsconfig.test.json diff --git a/project/gulpfile.mjs b/project/gulpfile.mjs index 4266bb65..56615014 100644 --- a/project/gulpfile.mjs +++ b/project/gulpfile.mjs @@ -31,11 +31,6 @@ const licenseFile = "../LICENSE.md"; */ const compile = async () => await exec("swc src -d obj", { stdio }); -/** - * Transpiles the src files into javascript with tsc for the profiler run - */ -const compileProfiler = async () => await exec("tsc -p tsconfig.test.json", { stdio }); - // Packaging const fetchPackageImage = async () => { @@ -290,6 +285,7 @@ gulp.task("run:build", async () => await exec("Aki.Server.exe", { stdio, cwd: bu gulp.task("run:debug", async () => await exec("ts-node-dev -r tsconfig-paths/register src/ide/TestEntry.ts", { stdio })); gulp.task("run:profiler", async () => { - await compileProfiler(); + await cleanCompiled(); + await compile(); await exec("node --prof --inspect --trace-warnings obj/ide/TestEntry.js", { stdio }); }); diff --git a/project/tsconfig.base.json b/project/tsconfig.base.json index 9ffde66b..20bab483 100644 --- a/project/tsconfig.base.json +++ b/project/tsconfig.base.json @@ -8,7 +8,13 @@ "esModuleInterop": true, "downlevelIteration": true, "experimentalDecorators": true, - "emitDecoratorMetadata": true + "emitDecoratorMetadata": true, + "baseUrl": ".", + "paths": { + "@spt-aki/*": [ + "src/*" + ] + } }, "include": [ "src/*", diff --git a/project/tsconfig.json b/project/tsconfig.json index de909065..f92b43f2 100644 --- a/project/tsconfig.json +++ b/project/tsconfig.json @@ -3,13 +3,7 @@ "compilerOptions": { "resolveJsonModule": true, "outDir": "obj", - "declaration": true, - "baseUrl": ".", - "paths": { - "@spt-aki/*": [ - "src/*" - ] - } + "declaration": true }, "include": [ "./src/**/*", diff --git a/project/tsconfig.test.json b/project/tsconfig.test.json deleted file mode 100644 index c7d718a9..00000000 --- a/project/tsconfig.test.json +++ /dev/null @@ -1,13 +0,0 @@ -{ - "extends": "./tsconfig.base.json", - "compilerOptions": { - "outDir": "obj", - "declaration": true, - "sourceMap": true, - "noImplicitAny": false - }, - "include": [ - "./types/**/*", - "./src/**/*" - ] -} diff --git a/project/tsconfig.typedef.json b/project/tsconfig.typedef.json index 3b1a4c78..235104aa 100644 --- a/project/tsconfig.typedef.json +++ b/project/tsconfig.typedef.json @@ -3,13 +3,7 @@ "compilerOptions": { "emitDeclarationOnly": true, "declaration": true, - "declarationDir": "./types", - "baseUrl": ".", - "paths": { - "@spt-aki/*": [ - "src/*" - ] - } + "declarationDir": "./types" }, "exclude": [ "./types/**/*"