Created
June 5, 2018 06:04
-
-
Save umegaya/3698a45f03f63b5831de304e2c081a92 to your computer and use it in GitHub Desktop.
sample script to launch multiple parcel command to watch directory and finish when ctrl-c is pressed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# watch script for parcel | |
if [ -z "$1" ]; then | |
# watch all | |
( | |
trap "kill 0" EXIT | |
for dir in `ls ./functions/` ; do | |
if [ -d "./functions/$dir" ]; then | |
parcel ./functions/$dir/index.ts -d dist/$dir & | |
fi | |
done | |
wait | |
) | |
else | |
parcel ./functions/$1/index.ts -d dist/$1 --log-level 3 | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment