endtoend-build 860 B

1234567891011121314151617181920212223242526
  1. #!/usr/bin/env bash
  2. set -o pipefail
  3. set -o errexit
  4. set -o nounset
  5. set -o xtrace
  6. # Set magic variables for current file & dir
  7. __dir="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
  8. __file="${__dir}/$(basename "${BASH_SOURCE[0]}")"
  9. __base="$(basename ${__file} .sh)"
  10. __root="$(cd "$(dirname "${__dir}")" && pwd)"
  11. echo "Preparing for end to end test: copying static HTML and CSS, building JS"
  12. rm -rf "${__root}/test/endtoend/dist" && mkdir "${__root}/test/endtoend/dist"
  13. rm -rf "${__root}/test/endtoend/node_modules"
  14. npm run build
  15. cp "${__root}/packages/uppy/dist/uppy.min.css" "${__root}/test/endtoend/dist"
  16. cp "${__root}/test/endtoend/src/index.html" "${__root}/test/endtoend/dist"
  17. browserify "${__root}/test/endtoend/src/main.js" \
  18. -o "${__root}/test/endtoend/dist/bundle.js" \
  19. -t babelify \
  20. -t aliasify
  21. rm -rf "${__root}/test/endtoend/node_modules"