Skip to content

Commit

Permalink
fix: cli in dev mode
Browse files Browse the repository at this point in the history
  • Loading branch information
arthurfiorette committed May 23, 2024
1 parent 2080324 commit ae263b6
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 14 deletions.
8 changes: 7 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ $ npx ts-json-schema-generator -t 'My.Type.Name' 'my/project/**/*.ts'

Or install the package and then run it

```bash
```console
$ npm install -D ts-json-schema-generator
$ node_modules/.bin/tsjg -t 'My.Type.Name' 'my/project/**/*.ts'
```
Expand All @@ -53,6 +53,12 @@ Note that different platforms (e.g. Windows) may use different path separators s

Also note that you need to quote paths with `*` as otherwise the shell will expand the paths and therefore only pass the first path to the generator.

You can also run the CLI with `TSJG_DEV=1` to run the CLI in development mode and have more verbose output.

```console
$ TSJG_DEV=1 node_modules/.bin/tsjg -t 'My.Type.Name' 'my/project/**/*.ts'
```

<br />

### Options
Expand Down
8 changes: 0 additions & 8 deletions bin/run.js

This file was deleted.

2 changes: 1 addition & 1 deletion bin/dev.js → bin/tjsg.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,6 @@
import { execute } from "@oclif/core";

await execute({
development: false,
development: !!process.env.TJSG_DEV,
dir: import.meta.url,
});
5 changes: 1 addition & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,10 +35,7 @@
},
"module": "dist/index.js",
"types": "dist/index.d.ts",
"bin": {
"tjsg": "./bin/run.js",
"tjsg-dev": "./bin/dev.js"
},
"bin": "./bin/tjsg.js",
"files": [
"dist",
"cjs",
Expand Down

0 comments on commit ae263b6

Please sign in to comment.