#!/bin/bash -e
# reset.sh
#
# Reset the project (kill listening React Native process, and clear the Metro bundler cache).

if [ "$(command -v lsof)" ]; then
    lsof -ti tcp:8081 | xargs kill
fi

if [ "$(command -v watchman)" ]; then
    watchman watch-del-all
fi
rm -rf /tmp/metro-bundler-cache-*
rm -rf /tmp/haste-map-react-native-packager-*
rm -fr $TMPDIR/metro*