Skip to content

Commit

Permalink
fix generation
Browse files Browse the repository at this point in the history
  • Loading branch information
arthurfiorette committed May 23, 2024
1 parent 592c1d9 commit 51bf47a
Show file tree
Hide file tree
Showing 2 changed files with 36 additions and 29 deletions.
63 changes: 35 additions & 28 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,19 +8,19 @@ Extended version of [https://github.com/xiag-ag/typescript-to-json-schema](https

---

- [Inspiration](#inspiration)
- [CLI Usage](#cli-usage)
- [Options](#options)
- [`tjsg autocomplete [SHELL]`](#tjsg-autocomplete-shell)
- [`tjsg generate`](#tjsg-generate)
- [`tjsg help [COMMAND]`](#tjsg-help-command)
- [Current state](#current-state)
- [Contributors](#contributors)
- [Programmatic Usage](#programmatic-usage)
- [Custom formatting](#custom-formatting)
- [Custom parsing](#custom-parsing)
- [Run locally](#run-locally)
- [Publish](#publish)
- [Inspiration](#inspiration)
- [CLI Usage](#cli-usage)
- [Options](#options)
- [`tjsg autocomplete [SHELL]`](#tjsg-autocomplete-shell)
- [`tjsg generate [PATH]`](#tjsg-generate-path)
- [`tjsg help [COMMAND]`](#tjsg-help-command)
- [Current state](#current-state)
- [Contributors](#contributors)
- [Programmatic Usage](#programmatic-usage)
- [Custom formatting](#custom-formatting)
- [Custom parsing](#custom-parsing)
- [Run locally](#run-locally)
- [Publish](#publish)

<br />

Expand All @@ -36,21 +36,18 @@ Inspired by [`YousefED/typescript-json-schema`](https://github.com/YousefED/type

## CLI Usage

<!-- usage -->
Run the schema generator with npx:

```sh-session
$ npm install -g ts-json-schema-generator
$ tjsg COMMAND
running command...
$ tjsg (--version|-v)
ts-json-schema-generator/2.0.0 linux-x64 node-v20.13.1
$ tjsg --help [COMMAND]
USAGE
$ tjsg COMMAND
...
```console
$ npx ts-json-schema-generator -t 'My.Type.Name' 'my/project/**/*.ts'
```

<!-- usagestop -->
Or install the package and then run it

```bash
$ npm install -D ts-json-schema-generator
$ node_modules/.bin/ts-json-schema-generator -t 'My.Type.Name' 'my/project/**/*.ts'
```

Note that different platforms (e.g. Windows) may use different path separators so you may have to adjust the command above.

Expand All @@ -62,9 +59,19 @@ Also note that you need to quote paths with `*` as otherwise the shell will expa

<!-- commands -->

- [`tjsg autocomplete [SHELL]`](#tjsg-autocomplete-shell)
- [`tjsg generate [PATH]`](#tjsg-generate-path)
- [`tjsg help [COMMAND]`](#tjsg-help-command)
- [Inspiration](#inspiration)
- [CLI Usage](#cli-usage)
- [Options](#options)
- [`tjsg autocomplete [SHELL]`](#tjsg-autocomplete-shell)
- [`tjsg generate [PATH]`](#tjsg-generate-path)
- [`tjsg help [COMMAND]`](#tjsg-help-command)
- [Current state](#current-state)
- [Contributors](#contributors)
- [Programmatic Usage](#programmatic-usage)
- [Custom formatting](#custom-formatting)
- [Custom parsing](#custom-parsing)
- [Run locally](#run-locally)
- [Publish](#publish)

## `tjsg autocomplete [SHELL]`

Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@
"format": "eslint --fix",
"lint": "eslint",
"prepublishOnly": "yarn build",
"release": "yarn build && git diff && auto shipit",
"release": "yarn build && auto shipit",
"run": "tsx ts-json-schema-generator.ts",
"test": "jest test/ --verbose",
"test:coverage": "yarn jest test/ --collectCoverage=true",
Expand Down

0 comments on commit 51bf47a

Please sign in to comment.