You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+48-2Lines changed: 48 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,7 +1,17 @@
1
1
# Protoc Tools gRPC Web Plugin
2
-
**This [accility/protoc-tools](https://github.com/accility/protoc-tools) plugin uses [protoc-gen-grpc-web](https://github.com/grpc/grpc-web/releases) to generate the gRPC Web files.** The protoc-gen-grpc-web binary can be downloaded and used as-is, however this have some implications, that mainly being: adding the binary to path and installation. This plugin solves both of theese issues.
3
2
4
-
For a more in-depth documentation, visit https://github.com/grpc/grpc-web.
3
+
This [protoc-tools](https://github.com/accility/protoc-tools) plugin uses the [protoc-gen-grpc-web](https://github.com/grpc/grpc-web/releases) binary to generate the gRPC Web files.
4
+
5
+
**NOTE!** The installer will by default download the latest version. Ensure that you specify the version to use. See [binary version](#binary-version).
The binary is downloaded when the package is installed. By default, the latest stable version (latest) is downloaded. It is recommended to specify the version of the binary in package.json under "config.protoc-gen-grpc-web-version". You can also specify the version in the "PROTOC_GEN_GRPC_WEB_VERSION" enviroment variable, which will be chosen over the version specified in package.json.
44
+
45
+
**NOTE!** Remember to execute "npm ci" to install the new binary.
46
+
47
+
Versions which can be used are:
48
+
49
+
- "latest" - latest stable version.
50
+
- "next" - latest prerelease version.
51
+
-[All syntaxes allowed in npm dependencies](https://docs.npmjs.com/about-semantic-versioning#using-semantic-versioning-to-specify-update-types-your-package-can-accept).
52
+
- Other syntaxes will be treated as the exact version to use.
53
+
54
+
```
55
+
{
56
+
"devDependencies": {
57
+
// The version of the plugin (not the binary):
58
+
"protoc-tools-grpc-web-plugin": "^3.2.1"
59
+
},
60
+
"config": {
61
+
// The version of the binary to be installed:
62
+
"protoc-gen-grpc-web-version": "^1.2.3"
63
+
}
64
+
}
65
+
```
66
+
67
+
## Enviroment variable flags
68
+
69
+
The installation script will notify when a enviroment varaiable flag is toggled.
70
+
71
+
- PROTOC_TOOLS_GRPC_WEB_PLUGIN_NO_INSTALL - installation will always exit.
72
+
73
+
- PROTOC_TOOLS_GRPC_WEB_PLUGIN_NO_CACHE - installation will always run.
74
+
75
+
- PROTOC_GEN_GRPC_WEB_VERSION - override binary version to install.
0 commit comments