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 <thesparta@noreply.dev.sp-tarkov.com>
Co-committed-by: TheSparta <thesparta@noreply.dev.sp-tarkov.com>
This commit is contained in:
TheSparta 2023-11-06 19:39:13 +00:00 committed by chomp
parent a244e89abe
commit 00fbc813ac
5 changed files with 11 additions and 34 deletions

View File

@ -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 });
});

View File

@ -8,7 +8,13 @@
"esModuleInterop": true,
"downlevelIteration": true,
"experimentalDecorators": true,
"emitDecoratorMetadata": true
"emitDecoratorMetadata": true,
"baseUrl": ".",
"paths": {
"@spt-aki/*": [
"src/*"
]
}
},
"include": [
"src/*",

View File

@ -3,13 +3,7 @@
"compilerOptions": {
"resolveJsonModule": true,
"outDir": "obj",
"declaration": true,
"baseUrl": ".",
"paths": {
"@spt-aki/*": [
"src/*"
]
}
"declaration": true
},
"include": [
"./src/**/*",

View File

@ -1,13 +0,0 @@
{
"extends": "./tsconfig.base.json",
"compilerOptions": {
"outDir": "obj",
"declaration": true,
"sourceMap": true,
"noImplicitAny": false
},
"include": [
"./types/**/*",
"./src/**/*"
]
}

View File

@ -3,13 +3,7 @@
"compilerOptions": {
"emitDeclarationOnly": true,
"declaration": true,
"declarationDir": "./types",
"baseUrl": ".",
"paths": {
"@spt-aki/*": [
"src/*"
]
}
"declarationDir": "./types"
},
"exclude": [
"./types/**/*"