Skip to content

Commit d01f926

Browse files
committed
Publish transformed JS artifact to NPM
Fixes #529
1 parent 4e33cc6 commit d01f926

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

gradle/publish-npm-js.gradle

+3-2
Original file line numberDiff line numberDiff line change
@@ -21,11 +21,12 @@ def npmDeployTag = distTag(version)
2121
def authToken = prop("kotlin.npmjs.auth.token", "")
2222
def dryRun = prop("dryRun", "false")
2323

24-
task preparePublishNpm(type: Copy, dependsOn: [compileKotlin2Js]) {
24+
// Note: publish transformed files using dependency on sourceSets.main.output
25+
task preparePublishNpm(type: Copy) {
2526
from(npmTemplateDir) {
2627
expand (project.properties + [kotlinDependency: "\"kotlin\": \"$kotlin_version\""])
2728
}
28-
from("$buildDir/classes/kotlin/main")
29+
from(sourceSets.main.output)
2930
into npmDeployDir
3031
}
3132

0 commit comments

Comments
 (0)