diff --git a/docs/dev_environment.md b/docs/dev_environment.md --- a/docs/dev_environment.md +++ b/docs/dev_environment.md @@ -821,7 +821,7 @@ In order to generate the codegen files for gRPC, you should run the following command: ``` -cd native +cd shared yarn codegen-grpc ``` diff --git a/native/scripts/mark-generated.sh b/native/scripts/mark-generated.sh deleted file mode 100755 --- a/native/scripts/mark-generated.sh +++ /dev/null @@ -1,3 +0,0 @@ -#!/usr/bin/env bash - -sed -i '' 's/\/\/ Generated by /\/\/ @generated by /g' cpp/CommonCpp/grpc/_generated/* \ No newline at end of file diff --git a/shared/package.json b/shared/package.json new file mode 100644 --- /dev/null +++ b/shared/package.json @@ -0,0 +1,9 @@ +{ + "name": "shared", + "version": "0.0.1", + "private": true, + "license": "BSD-3-Clause", + "scripts": { + "codegen-grpc": "protoc -I=protos --cpp_out=protos/_generated --grpc_out=protos/_generated --plugin=protoc-gen-grpc=`which grpc_cpp_plugin` protos/*.proto && ./scripts/mark-generated.sh" + } +} diff --git a/shared/scripts/mark-generated.sh b/shared/scripts/mark-generated.sh new file mode 100755 --- /dev/null +++ b/shared/scripts/mark-generated.sh @@ -0,0 +1,3 @@ +#!/usr/bin/env bash + +sed -i '' 's/\/\/ Generated by /\/\/ @generated by /g' protos/_generated/*