12345678910111213141516171819202122232425262728293031323334353637 |
- #!/usr/bin/env bash
- set -o pipefail
- set -o errexit
- set -o nounset
- set -o xtrace
- # Set magic variables for current file & dir
- __dir="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
- __file="${__dir}/$(basename "${BASH_SOURCE[0]}")"
- __base="$(basename ${__file} .sh)"
- __root="$(cd "$(dirname "${__dir}")" && pwd)"
- # Tests using a simple build setup.
- tests="chaos-monkey i18n-drag-drop providers thumbnails transloadit transloadit2 tus-drag-drop url-plugin xhr-limit"
- for t in $tests; do
- mkdir -p "${__root}/test/endtoend/$t/dist"
- cp "${__root}/packages/uppy/dist/uppy.min.css" "${__root}/test/endtoend/$t/dist"
- cp "${__root}/test/endtoend/$t/index.html" "${__root}/test/endtoend/$t/dist"
- browserify "${__root}/test/endtoend/$t/main.js" \
- -o "${__root}/test/endtoend/$t/dist/bundle.js" \
- -t @goto-bus-stop/envify \
- -t babelify
- done
- # Speeecial tests that need custom builds.
- pushd "${__root}/test/endtoend/create-react-app"
- npm install
- REACT_APP_ON_TRAVIS="${TRAVIS:-}" npm run build
- popd
- pushd "${__root}/test/endtoend/typescript"
- mkdir -p dist
- cp "${__root}/packages/uppy/dist/uppy.min.css" dist/
- cp index.html dist/
- browserify main.ts -t @goto-bus-stop/envify -p [ tsify --target ES3 ] -o dist/bundle.js
- popd
|