compile.sh 523 B

1234567891011121314151617181920
  1. #!/usr/bin/env bash
  2. # Path to this plugin
  3. PROTOC_GEN_TS_PATH="./node_modules/.bin/protoc-gen-ts"
  4. # Directory to write generated code to (.js and .d.ts files)
  5. OUT_DIR="./compiled"
  6. # mkdir -p ${OUT_DIR}
  7. # Directory to write generated documentation to
  8. OUT_DIR_DOC="./doc"
  9. mkdir -p ${OUT_DIR_DOC}
  10. protoc \
  11. --plugin="protoc-gen-ts=${PROTOC_GEN_TS_PATH}" \
  12. --js_out="import_style=commonjs,binary:${OUT_DIR}" \
  13. --ts_out="${OUT_DIR}" \
  14. --doc_out="${OUT_DIR_DOC}" --doc_opt=markdown,index.md \
  15. proto/*.proto