Skip to content

Commit

Permalink
re-use deps array for remove step
Browse files Browse the repository at this point in the history
  • Loading branch information
ijjk committed Jul 1, 2021
1 parent bad35ea commit dfca360
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions scripts/next-with-deps.sh
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,10 @@ done

if [ ! -z $HAS_CONFLICTING_DEP ] || [ ! -d "$PROJECT_DIR/node_modules" ];then
cd $PROJECT_DIR
yarn
rm -rf node_modules/{react,react-dom,styled-jsx,next}
yarn install
for dep in ${CONFLICTING_DEPS[@]};do
rm -rf node_modules/$dep
done
fi

cd $START_DIR
Expand Down

0 comments on commit dfca360

Please sign in to comment.