Reputation: 468
In the following project: https://github.com/MarcinMoskala/AnkiMarkdown
When I push a package to NPM, it seems empty. No binary code. I do export a single class: https://github.com/MarcinMoskala/AnkiMarkdown/blob/master/src/jsMain/kotlin/AnkiConnectorJs.kt
In the build/packages/js I have all the files I need, they are just not included in the final package.
Upvotes: 2
Views: 99
Reputation: 1992
Publish is likely being ran in an empty directory. Create a custom Gradle task and run publish within build/js/packages/AnkiMarkdown/
and you should be good.
val outputDirectory = "../build/js/packages/AnkiMarkdown/"
val taskPublish = "publish"
tasks.register(taskPublish) {
doLast {
exec {
workingDir = project.file(outputDirectory)
commandLine("npm", "publish")
}
}
}
Upvotes: 0