Skip to content

Commit

Permalink
feat(chor): add bin executable
Browse files Browse the repository at this point in the history
This MR adds bin executable into /node_modules/.bin/ folder after package is installed to simplify "provider" usage to just "prisma-json-schema-generator".
  • Loading branch information
muxahuk committed Nov 11, 2020
1 parent 7ce4c50 commit 9e30dff
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 2 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,14 +29,14 @@ yarn add -D prisma-json-schema-generator

```prisma
generator jsonSchema {
provider = "node node_modules/prisma-json-schema-generator"
provider = "prisma-json-schema-generator"
}
```

With a custom output path (default=./json-schema)
```prisma
generator jsonSchema {
provider = "node node_modules/prisma-json-schema-generator"
provider = "prisma-json-schema-generator"
output = "custom-output-path"
}
```
Expand Down
3 changes: 3 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -80,5 +80,8 @@
"singleQuote": true,
"semi": false,
"trailingComma": "all"
},
"bin": {
"prisma-json-schema-generator": "dist/cli.js"
}
}
3 changes: 3 additions & 0 deletions src/cli.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#!/usr/bin/env node

import './index'

0 comments on commit 9e30dff

Please sign in to comment.