Browse Source

protobuf: update README and scripts

Mokhtar Naamani 4 years ago
parent
commit
12844e2fb5

+ 7 - 1
content-metadata-protobuf/README.md

@@ -37,7 +37,13 @@ Building will compile the protofiles and build the library from source.
     - [protoc-gen-doc](https://github.com/pseudomuto/protoc-gen-doc) to generate docs
 
 ```
-yarn build
+yarn && yarn build
+```
+
+### Generating docs
+
+```
+yarn generate-docs
 ```
 
 ### Tests

+ 1 - 1
content-metadata-protobuf/compile.sh

@@ -7,7 +7,7 @@ PROTOC_GEN_TS_PATH="./node_modules/.bin/protoc-gen-ts"
 OUT_DIR="./compiled"
 mkdir -p ${OUT_DIR}
 
-# Compile proto files and also generate html docs
+# Compile proto files
 protoc \
     --plugin="protoc-gen-ts=${PROTOC_GEN_TS_PATH}" \
     --js_out="import_style=commonjs,binary:${OUT_DIR}" \

+ 2 - 2
content-metadata-protobuf/doc-appendix.md

@@ -19,7 +19,7 @@ struct VideoCreationParameters {
   meta: Vec<u8>,
 }
 
-// suppose assets is a vector of two elements. Thi is the "out of band" array being referenced by the VideoMetadata message
+// suppose assets is a vector of two elements. This is the "out of band" array being referenced by the VideoMetadata message
 assets = [
     NewAsset::Uri("https://mydomain.net/thumbnail.png"),
     NewAsset::Upload({
@@ -30,7 +30,7 @@ assets = [
     }),
 ];
 
-metat = VideoMetadata {
+meta = VideoMetadata {
     ...
     // refers to second element: assets[1] which is being uploaded to the storage system
     video: 1,

+ 2 - 2
content-metadata-protobuf/doc/index.md

@@ -346,7 +346,7 @@ struct VideoCreationParameters {
   meta: Vec<u8>,
 }
 
-// suppose assets is a vector of two elements. Thi is the "out of band" array being referenced by the VideoMetadata message
+// suppose assets is a vector of two elements. This is the "out of band" array being referenced by the VideoMetadata message
 assets = [
     NewAsset::Uri("https://mydomain.net/thumbnail.png"),
     NewAsset::Upload({
@@ -357,7 +357,7 @@ assets = [
     }),
 ];
 
-metat = VideoMetadata {
+meta = VideoMetadata {
     ...
     // refers to second element: assets[1] which is being uploaded to the storage system
     video: 1,

+ 1 - 0
content-metadata-protobuf/package.json

@@ -11,6 +11,7 @@
   "scripts": {
     "build": "./compile.sh && tsc",
     "compile": "./compile.sh",
+    "generate-doc": "./generate-md-doc.sh",
     "test": "env TS_NODE_COMPILER_OPTIONS='{\"module\": \"commonjs\" }' mocha -r ts-node/register 'test/**/*.ts'",
     "lint": "eslint ./src --ext .ts",
     "checks": "tsc --noEmit --pretty && prettier ./ --check && yarn lint",