-
Notifications
You must be signed in to change notification settings - Fork 3
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
Empty generated file for @blueprintjs/icons
#9
Comments
By default Karakum tries to preserve original structure of files, it may be good for granular imports (if library contains 100 files, but you need just one of them), but maybe not good strategy it is for small libs, so you can override it using "moduleNameMapper": {
".*": "blueprintjs-icons"
}
Because there is no analog for |
I'm sorry my knowledge of Kotlin externals is a bit limited, but I didn't think the file structure had anything to do with the module names. I thought it was independent. I'm totally ok with a file named
But what can I do to make things work then? I mean the other files aren't converted as they should. I don't mind that it doesn't re-export from the index file, but Karakum should follow the import and convert the corresponding files too, right? Here I would expect |
Now I see that my initial advice was incorrect, you should specify "moduleNameMapper": {
".*": "@blueprintjs/icons"
} If you want to see
And they do. The thing it that there is no
It is fair expectation, but what if |
I'm trying to generate typings for
@blueprintjs/icons
(I'm starting with this simple one as a PoC, and then I intend to move on to more complicated modules of course). See https://github.com/joffrey-bion/kotlin-blueprintjs for my existing declarations.In this
@blueprintjs/icons
NPM module, thepackage.json
'stypings
property points to thislib/esm/index.d.ts
definition file:But when I generate external from it using Karakum, I only get this empty-ish
index.kt
file:Here is my config for the Karakum Gradle plugin (in case it's useful):
So I have a couple questions:
Why is the
JsModule
calledblueprintjs-icons/index
? Is this because it's<libraryName>/<originalFileName>
? Could this cause a problem when importing these declarations in Kotlin? Or will this work out of the box?Why is everything commented?
The text was updated successfully, but these errors were encountered: