Skip to content

Commit 25fe480

Browse files
committed
Update READMEs and add keywords for npm
1 parent 373d074 commit 25fe480

File tree

3 files changed

+30
-3
lines changed

3 files changed

+30
-3
lines changed

README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,8 @@ To use Protocol Buffers with JavaScript, you need two main components:
3131
Project Status
3232
===
3333

34-
This project is currently in a working state.
34+
As of v4.0.0, you can directly install the `protoc-gen-js` plugin from npm as
35+
[@protocolbuffers/protoc-gen-js](https://www.npmjs.com/package/@protocolbuffers/protoc-gen-js).
3536

3637
**Support Status**
3738

protoc_plugin/README.md

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
This package is an official distribution of protoc-gen-js plugin generating
2+
javascript protobuf messages with protoc.
3+
4+
Aside from this package, you will need:
5+
6+
1. [protoc](https://github.com/protocolbuffers/protobuf/releases), the protobuf compiler.
7+
2. The protobuf-javascript runtime, obtainable from [npm as google-protobuf](https://www.npmjs.com/package/google-protobuf).
8+
9+
Usage:
10+
11+
```js
12+
// Assuming you installed this package as: npm install --save-dev @protocolbuffers/protoc-gen-js
13+
14+
protoc --plugin=./node_modules/.bin/protoc-gen-js --js_out=import_style=commonjs,binary:. messages.proto <additional .proto files>
15+
```
16+
17+
`protoc` will search PATH for `protoc-gen-js` if `--plugin` is omitted.
18+
19+
This command will generate javascript protobuf files (with a `_pb.js` suffix for
20+
commonjs imports) alongside their respective schema files
21+
(e.g. `messages_pb.js`).
22+
23+
Please see our
24+
[full documentation](https://github.com/protocolbuffers/protobuf-javascript/blob/main/docs/index.md)
25+
for more detailed usage instructions along with the generated code API.

protoc_plugin/package.json

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
11
{
22
"name": "@protocolbuffers/protoc-gen-js",
3-
"version": "4.0.0",
4-
"description": "Standalone distribution of the protoc-gen-js plugin for Protocol Buffers",
3+
"version": "4.0.0-1",
4+
"description": "Official standalone distribution of the protoc-gen-js plugin for Protocol Buffers",
55
"author": "Google Protocol Buffers Team",
66
"license": "BSD-3-Clause",
7+
"keywords": ["protocol buffers", "protobuf", "protoc-gen-js", "google-protobuf", "protobuf-javascript"],
78
"repository": {
89
"type": "git",
910
"url": "git+https://github.com/protocolbuffers/protobuf-javascript.git"

0 commit comments

Comments
 (0)