Kotlin / dukat

Converter of <any kind of declarations> to Kotlin external declarations
557 stars 42 forks source link

Separate filename from package name config #403

Open joffrey-bion opened 4 years ago

joffrey-bion commented 4 years ago

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:

?