项目作者: Kotlin

项目描述 :
Converter of to Kotlin external declarations
高级语言: Kotlin
项目地址: git://github.com/Kotlin/dukat.git
创建时间: 2018-11-28T13:59:13Z
项目社区:https://github.com/Kotlin/dukat

开源协议:

下载


Kotlin Experimental
JetBrains official project
GitHub license

Description

Converter of TypeScript definition files to Kotlin declarations

This requires JRE 1.6+ to run. It generates Kotlin files that are compatible with Kotlin 1.1+ (generated declarations
are tested against latest stable compiler version)

How to install

The simplest way to use is install the latest version form npm:

  1. npm install -g dukat

On a weekly basis we also deply a dev build which sums up what we currently have in master,
so if you want to checkout the snapshot version, use dukat@next:

  1. npm install -g dukat@next

Usage

  1. dukat [<options>] <d.ts files>

where possible options include:

  1. -p <qualifiedPackageName> package name for the generated file (by default filename.d.ts renamed to filename.d.kt)
  2. -m String use this value as @file:JsModule annotation value whenever such annotation occurs
  3. -d <path> destination directory for files with converted declarations (by default declarations are generated in current directory)
  4. -v, -version print version

How to setup and build

  1. clone this project

    1. # on Windows-based platforms set following: `git config core.autocrlf true`
    2. git clone <this project url>
  2. build

    1. ./gradlew build
  3. (optional) Run unit tests

  1. ./gradlew test -Pdukat.test.failure.always

see CHANGELOG

Useful links