Skip to content

Commit

Permalink
TSFileConfig fixes.
Browse files Browse the repository at this point in the history
  • Loading branch information
petervdonovan committed Jan 10, 2023
1 parent b8e47a9 commit 1023fe6
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions org.lflang/src/org/lflang/generator/ts/TSFileConfig.kt
Original file line number Diff line number Diff line change
Expand Up @@ -68,12 +68,12 @@ class TSFileConfig(
}

override fun getExecutable(): Path {
return binPath.resolve(name + executableExtension)
return srcGenPath.resolve("dist").resolve(name + executableExtension)
}

/**
* Path to TypeScript source code.
*/
override fun getSrcGenPath(): Path = srcGenPath.resolve("src")
override fun getSrcGenPath(): Path = srcGenPath

}
2 changes: 1 addition & 1 deletion org.lflang/src/org/lflang/generator/ts/TSGenerator.kt
Original file line number Diff line number Diff line change
Expand Up @@ -240,7 +240,7 @@ class TSGenerator(
) {
val tsFileName = fileConfig.name

val tsFilePath = context.fileConfig.srcGenPath.resolve("$tsFileName.ts")
val tsFilePath = context.fileConfig.srcGenPath.resolve("src").resolve("$tsFileName.ts")

val tsCode = StringBuilder()

Expand Down

1 comment on commit 1023fe6

@lhstrh
Copy link
Member

@lhstrh lhstrh commented on 1023fe6 Jan 10, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The change looks OK, but we can just remove the override of getSrcGenPath altogether as it doesn't do anything.

Please sign in to comment.