Skip to content
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

Separate filename from package name config #403

Open
joffrey-bion opened this issue Sep 6, 2020 · 0 comments
Open

Separate filename from package name config #403

joffrey-bion opened this issue Sep 6, 2020 · 0 comments
Milestone

Comments

@joffrey-bion
Copy link

joffrey-bion commented Sep 6, 2020

Currently, providing a -p com.mypackage option has 2 effects, which I strongly believe are different and should not be mixed.

  1. it makes the generated top-level members part of the given package, adding the package com.mypackage statement at the top of the file. This is IMO the expected behaviour of this option.
  2. it changes the output file's name to "${packageName}.module_${sourceModuleName}"

While 1) is exactly what I would expect, 2) prevents me from using Dukat on multiple files.

My goal is to convert a whole TS module and map it to a Kotlin package. If I provide the -p and -m options, and all .d.ts files of the module, Dukat overwrites the same file over and over because of behaviour 2).

Is there a way to provide options/arguments so that I can convert a whole module and have:

  • the same package statement in all generated Kotlin files
  • @JsModule for all files mapped to the module I'm converting
  • different Kotlin files for different source .d.ts files (so that they don't overwrite each other)

?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants