1.0.7 • Published 4 years ago

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

Weekly downloads
-
License
ISC
Repository
github
Last release
4 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

4 years ago

1.0.6

4 years ago

1.0.5

4 years ago

1.0.4

4 years ago

1.0.3

4 years ago

1.0.2

4 years ago

1.0.1

4 years ago

1.0.0

4 years ago