endtoend-build 683 B

123456789101112131415
  1. #!/usr/bin/env bash
  2. echo "Preparing for end to end test: copying static HTML and CSS, building JS"
  3. rm -rf ./test/endtoend/dist && mkdir ./test/endtoend/dist
  4. rm -rf ./test/endtoend/node_modules
  5. UPPY_VERSION=$(cat package.json | grep version | head -1 | awk -F= "{ print $2 }" | sed 's/[version:,\",]//g' | tr -d '[[:space:]]')
  6. # archive the uppy package
  7. npm pack
  8. # install from the archived uppy package
  9. npm install --prefix ./test/endtoend uppy-${UPPY_VERSION}.tgz
  10. cp ./test/endtoend/node_modules/uppy/dist/uppy.min.css ./test/endtoend/dist
  11. cp ./test/endtoend/src/index.html ./test/endtoend/dist
  12. browserify ./test/endtoend/src/main.js -o ./test/endtoend/dist/bundle.js -t babelify