deployment refined

This commit is contained in:
Sergey Chernov 2025-11-20 01:17:56 +01:00
parent 215c7245a0
commit f1e978599c
2 changed files with 9 additions and 4 deletions

View File

@ -45,8 +45,6 @@ case "com" in
esac
die() { echo "ERROR: $*" 1>&2 ; exit 1; }
#rm build/distributions/*.js > /dev/null
#rm build/distributions/*.js.map > /dev/null
./gradlew site:clean site:jsBrowserDistribution || die "compilation failed"

View File

@ -56,8 +56,7 @@ kotlin {
// Self-host MathJax via npm and bundle it with webpack
implementation(npm("mathjax", "3.2.2"))
}
// Serve project docs and images as static resources in the site
resources.srcDir(rootProject.projectDir.resolve("docs"))
// Serve images as static resources in the site
resources.srcDir(rootProject.projectDir.resolve("images"))
// Also include generated resources (e.g., docs index JSON)
// Use Gradle's layout to properly reference the build directory provider
@ -129,4 +128,12 @@ listOf(
}
}
// Copy Markdown docs into the "docs/" folder in the final resources, so paths in docs-index.json match files
tasks.named<Copy>("jsProcessResources").configure {
// Ensure we don't end up with two copies at root; we no longer add docs as a plain resources srcDir
from(rootProject.projectDir.resolve("docs")) {
into("docs")
}
}
// Optional: configure toolchain if needed by the project; uses root Kotlin version from version catalog