@bufbuild/protoc-gen-es
Advanced tools
Comparing version 1.1.1 to 1.2.0
{ | ||
"name": "@bufbuild/protoc-gen-es", | ||
"version": "1.1.1", | ||
"version": "1.2.0", | ||
"description": "Protocol Buffers code generator for ECMAScript", | ||
@@ -23,6 +23,6 @@ "license": "Apache-2.0", | ||
"dependencies": { | ||
"@bufbuild/protoplugin": "1.1.1" | ||
"@bufbuild/protoplugin": "1.2.0" | ||
}, | ||
"peerDependencies": { | ||
"@bufbuild/protobuf": "1.1.1" | ||
"@bufbuild/protobuf": "1.2.0" | ||
}, | ||
@@ -29,0 +29,0 @@ "peerDependenciesMeta": { |
{ | ||
"name": "@bufbuild/protoc-gen-es", | ||
"version": "1.1.1", | ||
"version": "1.2.0", | ||
"description": "Protocol Buffers code generator for ECMAScript", | ||
@@ -23,6 +23,6 @@ "license": "Apache-2.0", | ||
"dependencies": { | ||
"@bufbuild/protoplugin": "1.1.1" | ||
"@bufbuild/protoplugin": "1.2.0" | ||
}, | ||
"peerDependencies": { | ||
"@bufbuild/protobuf": "1.1.1" | ||
"@bufbuild/protobuf": "1.2.0" | ||
}, | ||
@@ -29,0 +29,0 @@ "peerDependenciesMeta": { |
@@ -18,3 +18,4 @@ # @bufbuild/protoc-gen-es | ||
We use peer dependencies to ensure that code generator and runtime library are | ||
compatible with each other. Note that yarn and pnpm only emit a warning in this case. | ||
compatible with each other. Note that npm installs them automatically, but yarn | ||
and pnpm do not. | ||
@@ -26,2 +27,6 @@ | ||
```bash | ||
npm install --save-dev @bufbuild/buf | ||
``` | ||
Add a new configuration file `buf.gen.yaml`: | ||
@@ -37,22 +42,11 @@ | ||
out: src/gen | ||
opt: target=ts | ||
opt: | ||
# Add more plugin options here | ||
- target=ts | ||
``` | ||
Add the following script to your `package.json`: | ||
```json | ||
{ | ||
"name": "your-package", | ||
"version": "1.0.0", | ||
"scripts": { | ||
"generate": "buf generate" | ||
}, | ||
// ... | ||
} | ||
``` | ||
To generate code for all protobuf files within your project, simply run: | ||
```bash | ||
npm run generate | ||
npx buf generate | ||
``` | ||
@@ -59,0 +53,0 @@ |
147230
117
+ Added@bufbuild/protobuf@1.2.0(transitive)
+ Added@bufbuild/protoplugin@1.2.0(transitive)
- Removed@bufbuild/protobuf@1.1.1(transitive)
- Removed@bufbuild/protoplugin@1.1.1(transitive)
Updated@bufbuild/protoplugin@1.2.0