-
-
Notifications
You must be signed in to change notification settings - Fork 38
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add CLI interface #184
base: master
Are you sure you want to change the base?
Add CLI interface #184
Conversation
This adds a CLI interface so that joi-to-typescript can be invoked as a binary. Example: $ joi-to-typescript src/schemas gen --sort=name --debug The binary requires that ts-node is installed globally.
This works fine when I'm testing locally using |
Codecov Report
@@ Coverage Diff @@
## master #184 +/- ##
=======================================
Coverage 98.65% 98.65%
=======================================
Files 8 8
Lines 447 447
Branches 162 162
=======================================
Hits 441 441
Misses 6 6 Continue to review full report at Codecov.
|
I've had a go but I'm not sure how to get this working, are you able to help me get it going maybe with some readme notes or notes here? |
Of course, sorry, I should have added a section to README as well. I will push another commit. Let's say I have
Previously I would create a file called
And then add to my
But with a binary, I can skip creating my wrapper script
|
Added README as per https://github.com/henhal/joi-to-typescript/blob/cli/README.md |
Thanks dude, sorry I took ages to review this |
This command can be used (with 2.4.0)
|
This adds a CLI interface so that joi-to-typescript can be invoked as a binary.
Example:
The binary requires that ts-node is installed globally.
Fixes #183.