protobuf-demo: Add scripts to pack proto definitions

This commit is contained in:
willclarktech 2020-06-11 11:26:45 +01:00
parent 7a2e264155
commit b9bdf5581e
No known key found for this signature in database
GPG Key ID: 551A86E2E398ADF7

View File

@ -32,7 +32,10 @@
"test-chrome": "yarn pack-web && karma start --single-run --browsers ChromeHeadless",
"test": "yarn build-or-skip && yarn test-node",
"pack-web": "yarn build-or-skip && webpack --mode development --config webpack.web.config.js",
"get-proto": "./scripts/get-proto.sh"
"get-proto": "./scripts/get-proto.sh",
"prepack-proto": "mkdir -p src/generated",
"pack-proto": "pbjs -t static-module -w commonjs -o src/generated/codecimpl.js ./proto/**/*.proto",
"define-proto": "pbts src/generated/codecimpl.js -o src/generated/codecimpl.d.ts"
},
"devDependencies": {
"protobufjs": "^6.9.0"