Skip to content
This repository has been archived by the owner on Jun 14, 2021. It is now read-only.

Commit

Permalink
fix: codegen bin commands (#133)
Browse files Browse the repository at this point in the history
* fix: add bin command
  • Loading branch information
aimed authored Jul 13, 2019
1 parent 6e06dc1 commit 8bd7d16
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 3 deletions.
2 changes: 2 additions & 0 deletions codegen/bin/slushy-codegen
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
#!/usr/bin/env node
require('../dist/index.js')
4 changes: 3 additions & 1 deletion codegen/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,9 @@
"repository": "https://github.com/aimed/slushy",
"author": "Maximilian Taeschner",
"license": "MIT",
"bin": "./dist/index.js",
"bin": {
"slushy-codegen": "./bin/slushy-codegen"
},
"dependencies": {
"commander": "^2.20.0",
"fs-extra": "^8.0.1",
Expand Down
4 changes: 2 additions & 2 deletions docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -96,10 +96,10 @@ await app.start(3000)
yarn add @slushy/codegen
# Generate code based on an OpenApi file
yarn @slushy/codegen gen ./openApi.yaml ./src/generated
yarn slushy-codegen gen ./openApi.yaml ./src/generated
```

The command line tool takes the following arguments: `@slushy/codegen gen <Open Api File> <Generated Code Dir> [Code generators]`.
The command line tool takes the following arguments: `slushy-codegen gen <Open Api File> <Generated Code Dir> [Code generators]`.

Currently the following code generators are supported:

Expand Down

0 comments on commit 8bd7d16

Please sign in to comment.