Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add plugin option to automatically add JS executable as a resource #160

Open
altavir opened this issue Mar 10, 2021 · 0 comments
Open

Add plugin option to automatically add JS executable as a resource #160

altavir opened this issue Mar 10, 2021 · 0 comments

Comments

@altavir
Copy link
Contributor

altavir commented Mar 10, 2021

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants