Skip to content

Commit

Permalink
chore: update tsconfig and build tasks
Browse files Browse the repository at this point in the history
Signed-off-by: Ar Rakin <rakinar2@onesoftnet.eu.org>
  • Loading branch information
virtual-designer committed Oct 18, 2024
1 parent 1e91824 commit bf14d00
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 12 deletions.
5 changes: 0 additions & 5 deletions build_src/src/main/typescript/tasks/CompileTask.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ import {
files,
type Awaitable
} from "blazebuild";
import { $ } from "bun";
import path from "path";

@Task({
Expand All @@ -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
Expand Down
11 changes: 11 additions & 0 deletions build_src/src/main/typescript/tasks/CompileTypeScriptTask.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,17 @@ class CompileTypeScriptTask extends AbstractTask {
protected override async run(): Promise<void> {
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
Expand Down
11 changes: 4 additions & 7 deletions tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand All @@ -58,6 +53,8 @@
"./build_src/**",
"./node_modules",
"./storage",
"build.blaze.ts"
"build.blaze.ts",
"drizzle.config.ts",
"commitlint.config.ts"
]
}

0 comments on commit bf14d00

Please sign in to comment.