diff --git a/build_src/src/main/typescript/tasks/CompileTask.ts b/build_src/src/main/typescript/tasks/CompileTask.ts index 572f84bc8..4662d43ae 100644 --- a/build_src/src/main/typescript/tasks/CompileTask.ts +++ b/build_src/src/main/typescript/tasks/CompileTask.ts @@ -8,7 +8,6 @@ import { files, type Awaitable } from "blazebuild"; -import { $ } from "bun"; import path from "path"; @Task({ @@ -24,10 +23,6 @@ class CompileTask extends AbstractTask { if (!buildOutputDirectory) { throw new Error("buildOutputDirectory is not defined in project properties"); } - - await $`mv ${buildOutputDirectory}/out/src ${buildOutputDirectory}/out.tmp`; - await $`rm -rf ${buildOutputDirectory}/out`; - await $`mv ${buildOutputDirectory}/out.tmp ${buildOutputDirectory}/out`; } @TaskDependencyGenerator diff --git a/build_src/src/main/typescript/tasks/CompileTypeScriptTask.ts b/build_src/src/main/typescript/tasks/CompileTypeScriptTask.ts index 0e4967250..6de861a57 100644 --- a/build_src/src/main/typescript/tasks/CompileTypeScriptTask.ts +++ b/build_src/src/main/typescript/tasks/CompileTypeScriptTask.ts @@ -21,6 +21,17 @@ class CompileTypeScriptTask extends AbstractTask { protected override async run(): Promise { IO.newline(); await $`bun x tsc`; + + const buildOutputDirectory = + this.blaze.projectManager.properties.structure?.buildOutputDirectory; + + if (!buildOutputDirectory) { + throw new Error("buildOutputDirectory is not defined in project properties"); + } + + await $`mv ${buildOutputDirectory}/out/src ${buildOutputDirectory}/out.tmp`; + await $`rm -rf ${buildOutputDirectory}/out`; + await $`mv ${buildOutputDirectory}/out.tmp ${buildOutputDirectory}/out`; } @TaskInputGenerator diff --git a/tsconfig.json b/tsconfig.json index 277a5d2fe..99f0ee5b8 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -33,12 +33,7 @@ "@root/*": ["./*"] } }, - "include": [ - "src/main/typescript/types/global/globals.d.ts", - "src/**/*.ts", - "drizzle.config.ts", - "commitlint.config.ts" - ], + "include": ["src/main/typescript/types/global/globals.d.ts", "src/**/*.ts"], "exclude": [ "./backup", "./tmp", @@ -58,6 +53,8 @@ "./build_src/**", "./node_modules", "./storage", - "build.blaze.ts" + "build.blaze.ts", + "drizzle.config.ts", + "commitlint.config.ts" ] }