Skip to content

Commit

Permalink
Merge pull request #931 from samuveth/samuv/fix-dev
Browse files Browse the repository at this point in the history
feat: add dynamic watch paths for agent development
  • Loading branch information
shakkernerd authored Dec 9, 2024
2 parents 5a2994e + 9e5e4b1 commit 31143ae
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion scripts/dev.sh
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,13 @@ else
fi

if [ -d "./agent" ]; then
COMMANDS+=("node -e \"setTimeout(() => process.exit(0), 5000)\" && pnpm --dir agent dev -- $*")
# Build the watch paths dynamically from WORKING_FOLDERS
WATCH_PATHS=()
for FOLDER in "${WORKING_FOLDERS[@]}"; do
WATCH_PATHS+=("--watch './packages/$FOLDER/dist'")
done

COMMANDS+=("nodemon ${WATCH_PATHS[@]} -e js,json,map --delay 2 --exec 'pnpm --dir agent dev -- $*'")
else
echo "Warning: 'agent' directory not found."
fi
Expand Down

0 comments on commit 31143ae

Please sign in to comment.