compile.sh 388 B

123456789101112131415
  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. # Compile proto files
  8. protoc \
  9. --plugin="protoc-gen-ts=${PROTOC_GEN_TS_PATH}" \
  10. --js_out="import_style=commonjs,binary:${OUT_DIR}" \
  11. --ts_out="${OUT_DIR}" \
  12. proto/*.proto