compile.sh 301 B

12345678910111213141516
  1. #!/usr/bin/env bash
  2. # Directory to write generated code to (.js and .d.ts files)
  3. OUT_DIR="./compiled"
  4. mkdir -p ${OUT_DIR}
  5. yarn pbjs \
  6. -t="static-module" \
  7. -w="commonjs" \
  8. -o="${OUT_DIR}/index.js" \
  9. --force-long \
  10. proto/*.proto
  11. yarn pbts \
  12. -o="${OUT_DIR}/index.d.ts" \
  13. ${OUT_DIR}/*.js