Skip to content

Commit

Permalink
small fix
Browse files Browse the repository at this point in the history
  • Loading branch information
BlazeMCworld committed Feb 11, 2023
1 parent 2ccbb0e commit 71f316e
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/main/java/de/blazemcworld/jsscripts/TypingGen.java
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,10 @@ public static void genTypesIn(String targets) {
Path out = JsScripts.MC.runDirectory.toPath()
.resolve("JsScripts");

if (!out.toFile().exists()) {
out.toFile().mkdirs();
}

Files.writeString(out.resolve("jsconfig.json"), """
{
"compilerOptions": {
Expand All @@ -48,6 +52,10 @@ public static void genTypesIn(String targets) {

out = out.resolve("types");

if (!out.toFile().exists()) {
out.toFile().mkdirs();
}

Files.writeString(out.resolve("global.d.ts"), """
declare const script: import("../types/de/blazemcworld/jsscripts/Script").default;
""");
Expand Down

0 comments on commit 71f316e

Please sign in to comment.