1.0.7 • Published 3 years ago

@nowak-ds/api-type-formatter v1.0.7

Weekly downloads
-
License
ISC
Repository
github
Last release
3 years ago

API type formatter

This module can convert an API JSON description into TypeScript typings.

Installation

npm i @nowak-ds/api-type-formatter

Configuration

Create file called convert-config.json in your porjects root directory. The file should look like this.

{
    "targetDir": "src/types",
    "src": [
        {
            "url": "http://localhost:3000/api",
            "name": "Api1"
        },
        {
            "url": "http://localhost:3000/api2",
            "name": "Api2"
        }
    ]
}

Execute

Simply call:

node node_modules/@nowak-ds/api-type-formatter/index.js

Or create a new script in your package.json file:

"scripts": {
    "update-types": "node node_modules/@nowak-ds/api-type-formatter/index.js"
 }
1.0.7

3 years ago

1.0.6

3 years ago

1.0.5

3 years ago

1.0.4

3 years ago

1.0.3

3 years ago

1.0.2

3 years ago

1.0.1

3 years ago

1.0.0

3 years ago