Skip to content

using npm-publish with groovy #80

Answered by mpetuska
sharongur asked this question in Q&A
Dec 21, 2022 · 18 comments · 12 replies
Discussion options

You must be logged in to vote

Can you try this config instead? Hopefully it will make more sense with a specific example.

tasks {
  // This is just a stub to imitate your ts generation task
  register("generateJsFile") {
    val outDir = buildDir.resolve("genJs")
    // Note that it declares outputs
    outputs.dir(outDir)
    doFirst {
      outDir.mkdirs()
      buildDir.resolve("genJs/custom.js").writeText("console.log('hello world')")
    }
  }
}

npmPublish {
  nodeHome.set(File("${System.getProperty("user.home")}/.gradle/nodejs/node-v16.13.0-linux-x64/"))
  packages {
    register("myPrivatePackage") {
      version.set("4.20.69")
      packageName.set("my-private-package")
      files {
        // Since the tas…

Replies: 18 comments 12 replies

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Answer selected by mpetuska
Comment options

You must be logged in to vote
12 replies
@mpetuska
Comment options

@sharongur
Comment options

@sharongur
Comment options

@mpetuska
Comment options

@sushant-dev01
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants
Converted from issue

This discussion was converted from issue #79 on December 22, 2022 15:16.