Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/qiwi/libdefkit

Utility to produce single file TS and Flow libdefs
https://github.com/qiwi/libdefkit

flow tsc types

Last synced: 4 days ago
JSON representation

Utility to produce single file TS and Flow libdefs

Awesome Lists containing this project

README

        

# @qiwi/libdefkit
[![Maintainability](https://api.codeclimate.com/v1/badges/75f356021f0789f1c38d/maintainability)](https://codeclimate.com/github/qiwi/libdefkit/maintainability)
[![Test Coverage](https://api.codeclimate.com/v1/badges/75f356021f0789f1c38d/test_coverage)](https://codeclimate.com/github/qiwi/libdefkit/test_coverage)

> Util toolset to produce single-file TS and Flow libdefs

## Requirements
Node.js >= 16

## Install
```shell script
yarn add @qiwi/libdefkit -D
```

## Usage
Insert script to `package.json`
```json
{
"scripts": {
"build:libdef": "libdefkit --tsconfig=tsconfig.esm.json --tsconfig=tsconfig.cjs.json"
}
}
```

## CLI
| Flag | Description | Default |
|-------------------|-------------------------------------------------------------|----------------------------|
| `--help` | Display usage hints | |
| `--cwd` | Set current working dir | `process.cwd()` |
| `--entry` | Define pkg entry point | `./index.ts` |
| `--ext` | Extension to use in module declarations. `''` to unset any. | `.js` |
| `--tsconfig` | Define path(s) to project's TS config | |
| `--customTypings` | Attach custom libdefs to d.ts bundle | |
| `--cache` | Dir for temporary assets | `tempy.directory()` |
| `--dtsOut` | **TS** typings output | `typings/index.d.ts` |
| `--flowOut` | **Flow** libdef output | `flow-typed/index.flow.js` |

## License
[MIT](./LICENSE)