-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Lowercase the webrpc-cli custom -options
- Loading branch information
1 parent
f43dabc
commit 291f8ef
Showing
7 changed files
with
32 additions
and
32 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -20,33 +20,33 @@ write by hand. | |
## Usage | ||
|
||
``` | ||
webrpc-gen -schema=example.ridl -target=javascript -Server -Client -out=./example.gen.ts | ||
webrpc-gen -schema=example.ridl -target=javascript -server -client -out=./example.gen.ts | ||
``` | ||
|
||
or | ||
|
||
``` | ||
webrpc-gen -schema=example.ridl -target=github.com/webrpc/[email protected] -Server -Client -out=./example.gen.js | ||
webrpc-gen -schema=example.ridl -target=github.com/webrpc/[email protected] -server -client -out=./example.gen.js | ||
``` | ||
|
||
or | ||
|
||
``` | ||
webrpc-gen -schema=example.ridl -target=./local-templates-on-disk -Server -Client -out=./example.gen.js | ||
webrpc-gen -schema=example.ridl -target=./local-templates-on-disk -server -client -out=./example.gen.js | ||
``` | ||
|
||
### Set custom template variables | ||
Change any of the following values by passing `-Option="Value"` CLI flag to `webrpc-gen`. | ||
|
||
| CLI option flag | Description | Default value | | ||
|----------------------|----------------------------|----------------------------| | ||
| `-Client` | generate client code | unset (`false`) | | ||
| `-Server` | generate server code | unset (`false`) | | ||
| `-Exports=false` | disable "exports" in code | enabled (`true`) | | ||
| `-client` | generate client code | unset (`false`) | | ||
| `-server` | generate server code | unset (`false`) | | ||
| `-exports=false` | disable "exports" in code | enabled (`true`) | | ||
|
||
Example: | ||
``` | ||
webrpc-gen -schema=example.ridl -target=javascript -Server -Client -Exports=false -out=./example.gen.js | ||
webrpc-gen -schema=example.ridl -target=javascript -server -client -exports=false -out=./example.gen.js | ||
``` | ||
|
||
## LICENSE | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,7 +2,7 @@ | |
// -- | ||
// Code generated by [email protected] with custom generator. DO NOT EDIT. | ||
// | ||
// webrpc-gen -schema=hello-api.ridl -target=../../ -Export=false -client -out=./webapp/client.gen.js | ||
// webrpc-gen -schema=hello-api.ridl -target=../../ -exports=false -client -out=./webapp/client.gen.js | ||
|
||
// WebRPC description and code-gen version | ||
export const WebRPCVersion = "v1" | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
{{- define "help" -}} | ||
{{- stderrPrintf "\nAvailable template options:\n" -}} | ||
{{- range $k, $v := . -}} | ||
{{- stderrPrintf " -%v=%v\n" $k $v -}} | ||
{{- end -}} | ||
{{- stderrPrintf "See https://github.com/webrpc/gen-javascript for more info.\n" -}} | ||
{{- end -}} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters