Skip to content

Commit

Permalink
Fix file path building on Windows
Browse files Browse the repository at this point in the history
Closes: #71
  • Loading branch information
tajakobsen committed Sep 25, 2024
1 parent 0b193af commit 0f6ff09
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/main/kotlin/no/item/xp/plugin/GenerateCodeTask.kt
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ open class GenerateCodeTask

if (files.isNotEmpty()) {
val fileContent = renderGlobalContentTypeMap(files, appName)
val targetFile = File(rootOutputDir.absolutePath + "/site/content-types/index.d.ts")
val targetFile = File(concatFileName(rootOutputDir.absolutePath, "site", "content-types", "index.d.ts"))
writeTargetFile(targetFile, fileContent, prependText, singleQuote)
logger.lifecycle("Updated file: ${Path.of(targetFile.toURI()).toUri()}")
}
Expand Down Expand Up @@ -207,7 +207,7 @@ open class GenerateCodeTask

if (files.isNotEmpty()) {
val fileContent = renderGlobalXDataMap(files, appName)
val targetFile = File(rootOutputDir.absolutePath + "/site/x-data/index.d.ts")
val targetFile = File(concatFileName(rootOutputDir.absolutePath, "site", "x-data", "index.d.ts"))
writeTargetFile(targetFile, fileContent, prependText, singleQuote)
logger.lifecycle("Updated file: ${Path.of(targetFile.toURI()).toUri()}")
}
Expand Down

0 comments on commit 0f6ff09

Please sign in to comment.