galex
07/01/2019, 11:26 AMorg.jetbrains.kotlin.js
gradle plugin has capabilities to deploy the code as an npm module? Where can I find its documentation?anton.bannykh
07/01/2019, 11:27 AMsnrostov
07/01/2019, 11:28 AMgalex
07/01/2019, 11:29 AMgalex
07/01/2019, 11:30 AMsnrostov
07/01/2019, 11:33 AMpackage.json
already created by the plugin. It is located in build/js/packages/<compilationName>/package.json
. But it is has some issues for publishing: devDependencies
messed with dependencies
and some other minor things. So, yes, meanwhile it is better to create package.json for publishing manually by copying build/js/packages/<compilationName>
contents and replacing/patching package.json
.galex
07/01/2019, 11:34 AMgalex
07/01/2019, 11:53 AMnew-multiplatform
but here you go https://youtrack.jetbrains.com/issue/KT-32332snrostov
07/01/2019, 11:56 AMgalex
07/01/2019, 12:11 PMnpm ERR! notarget No matching version found for kotlinx-io@0.1.10
npm ERR! notarget In most cases you or one of your dependencies are requesting
npm ERR! notarget a package version that doesn't exist.
galex
07/01/2019, 12:12 PM0.1.4-SNAPSHOT
doesn’t seem relevant, is it?galex
07/01/2019, 12:48 PMsnrostov
07/01/2019, 12:51 PM@snrostov Is this what you meant by messed up dependencies?No, I mean that
webpack
and other dev tools are in dependencies
, but should be in devDependencies
. For example, currently this package.json
generated:
{
"main": "kotlin/mppapp18.js",
"devDependencies": {},
"dependencies": {
"webpack": "4.29.6",
"webpack-cli": "3.3.0",
"source-map-loader": "0.2.4",
"source-map-support": "0.5.12",
"webpack-dev-server": "3.3.1",
"kotlin": "1.3.40"
},
"name": "mppapp18",
"version": "0.0.0-unspecified"
}
But should be:
{
"main": "kotlin/mppapp18.js",
"devDependencies": {
"webpack": "4.29.6",
"webpack-cli": "3.3.0",
"source-map-loader": "0.2.4",
"source-map-support": "0.5.12",
"webpack-dev-server": "3.3.1"
},
"dependencies": {
"kotlin": "1.3.40"
},
"name": "mppapp18",
"version": "0.0.0-unspecified"
}
snrostov
07/01/2019, 12:53 PMWhat I am supposed to do if dependencies I need are not deployed themselves to https://www.npmjs.com/ ?You may bundle this dependencies in your package. There is http://npm.github.io/using-pkgs-docs/package-json/types/bundleddependencies.html for that.
galex
07/01/2019, 12:57 PM