Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/brokeboiflex/schemer
https://github.com/brokeboiflex/schemer
Last synced: about 2 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/brokeboiflex/schemer
- Owner: brokeboiflex
- Created: 2024-02-05T18:47:44.000Z (11 months ago)
- Default Branch: master
- Last Pushed: 2024-02-05T19:51:57.000Z (11 months ago)
- Last Synced: 2024-02-05T20:23:10.854Z (11 months ago)
- Language: JavaScript
- Size: 21.5 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: readme.md
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