Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/usr/bin/env bash
- set -euo pipefail && cd "$(dirname "${BASH_SOURCE[0]}")/.."
- # When you're down and out
- # When you're on the street
- # When evening falls so hard, I will comfort you
- # I will clean your build artifacts
- # Disclaimer: use at your own risk
- pidkill() {
- set +e
- x=$(lsof -i ":$1" -sTCP:LISTEN -P -n -F p | grep '^p' | sed 's/^p//' | head -1)
- if [[ "$x" != "" ]]; then
- echo "Killing PID $x listening on port $1..."
- kill "$x"
- fi
- set -e
- }
- # remove everything, just to be shure
- rm -rf target
- rm -rf ios/build
- rm -rf "$HOME/Library/Developer/Xcode/DerivedData"
- lein clean
- re-natal use-figwheel
- pidkill 8081 # kill packager
- # delete react native packager cache
- find "$TMPDIR" -depth 1 -name 'react-*' -delete
- if which watchman; then
- watchman watch-del-all
- fi
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement