Simple email application for Android. Original source code: https://framagit.org/dystopia-project/simple-email
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

56 lines
1.1 KiB

  1. #!/usr/bin/env bash
  2. set -e
  3. if [ ! -d node_modules ]; then
  4. echo "[B] Run 'npm install' first"
  5. exit 1
  6. fi
  7. clean() {
  8. rm -f .babelrc
  9. rm -rf lib/*
  10. }
  11. makeLib() {
  12. echo '[B] Compiling Bottleneck to Node 6+...'
  13. ln -s .babelrc.lib .babelrc
  14. node_modules/coffeescript/bin/coffee --compile --bare --no-header --transpile src/*.coffee
  15. node scripts/assemble_lua.js > lib/lua.json
  16. mv src/*.js lib/
  17. }
  18. makeBundle() {
  19. echo '[B] Compiling Bottleneck to ES5...'
  20. ln -s .babelrc.bundle .babelrc
  21. node_modules/coffeescript/bin/coffee --compile --bare --no-header src/*.coffee
  22. node scripts/assemble_lua.js > lib/lua.json
  23. mv src/*.js lib/
  24. echo '[B] Assembling ES5 bundle...'
  25. node_modules/rollup/bin/rollup -c rollup.config.js
  26. }
  27. makeTypings() {
  28. echo '[B] Compiling and testing TS typings...'
  29. node_modules/ejs-cli/bin/ejs-cli bottleneck.d.ts.ejs > bottleneck.d.ts
  30. node_modules/typescript/bin/tsc --noEmit --strict test.ts
  31. }
  32. if [[ $1 = 'dev' ]]; then
  33. clean
  34. makeLib
  35. elif [[ $1 = 'bundle' ]]; then
  36. clean
  37. makeBundle
  38. else
  39. clean
  40. makeBundle
  41. clean
  42. makeLib
  43. makeTypings
  44. fi
  45. rm -f .babelrc
  46. echo '[B] Done!'