kotlin-jupyter
kotlin-jupyter copied to clipboard
Add plugin option to automatically add JS executable as a resource
The next step for #148.
This requires three things:
- Specify the name of the bundle JS (and maybe css) like this:
js{
browser {
webpackTask {
this.outputFileName = "js/jupyter-bundle.js"
}
}
binaries.executable()
}
- Add resource dependency on the bundle like
afterEvaluate {
val jsBrowserDistribution by tasks.getting
tasks.getByName<ProcessResources>("jvmProcessResources") {
dependsOn(jsBrowserDistribution)
afterEvaluate {
from(jsBrowserDistribution)
}
}
}
- Add the
resourceFromJsTarget
function in the resource builder to load a class-path resource.
Willing to contribute to this one as well as soon as I have time.