Ecosyste.ms: Awesome

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

Awesome Lists | Featured Topics | Projects

https://github.com/brokeboiflex/schemer


https://github.com/brokeboiflex/schemer

Last synced: about 2 months ago
JSON representation

Awesome Lists containing this project

README

        

# jsontsschemer

`jsontsschemer` is a utility package for automatic type generation from `.json` files

# Instalation

`npm i jsontsschemer`

# Config

Create a `schemer.json` file in your project's root directory

```json
{
"jsonFiles": [
"path/to/inputFile1.json",
"path/to/inputFile2.json",
...
],
"outputFiles": [
"path/to/outputFile1.ts",
"path/to/outputFile2.ts",
...
]
}
```

# Usage

Add those two scripts to your `package.json`

```json
scripts: {
"generate-types": "jsontsschemeer gen",
"watch-json": "jsontsschemer watch"
}
```

And use as needed