Skip to content

Commit

Permalink
Don’t gitignore /internal/npm_install/test/golden/node_modules
Browse files Browse the repository at this point in the history
Also clean *all* node_modules folders in clean script included nested ones
  • Loading branch information
gregmagolan committed Apr 22, 2019
1 parent 3802ffa commit 54db71e
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 7 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ rules_nodejs-*.tar.gz
/internal/e2e/*/bazel-*
/internal/npm_install/test/package/*
node_modules
!/internal/npm_install/test/golden/node_modules
examples/vendored_node/node-v10.12.0-linux-x64
examples/vendored_node/node-v10.12.0-linux-x64.tar.xz
examples/vendored_node/yarn-v1.10.0
Expand Down
6 changes: 2 additions & 4 deletions scripts/clean_all.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,7 @@ cd ${RULES_NODEJS_DIR}
echo_and_run() { echo "+ $@" ; "$@" ; }

echo_and_run rm -rf ./dist
echo_and_run rm -rf ./node_modules
echo_and_run rm -rf ./examples/program/node_modules
echo_and_run rm -rf ./internal/npm_install/test/package/node_modules
echo_and_run rm -rf `find . -type d -name node_modules -prune -not -path "./internal/npm_install/test/golden/node_modules"`

echo_and_run bazel clean --expunge

Expand All @@ -30,7 +28,7 @@ ${RULES_NODEJS_DIR}/scripts/clean_packages_all.sh
if [[ -e 'WORKSPACE' ]] ; then
printf "\n\nCleaning /internal/e2e/${subDir}\n"
echo_and_run bazel clean --expunge
echo_and_run rm -rf node_modules
echo_and_run rm -rf `find . -type d -name node_modules -prune`
fi
)
done
Expand Down
2 changes: 1 addition & 1 deletion scripts/clean_e2e.sh
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,6 @@ for e2eTest in ${E2E_TESTS[@]} ; do
printf "\n\nCleaning e2e test ${e2eTest}\n"
${RULES_NODEJS_DIR}/scripts/unlink_deps.sh
echo_and_run bazel clean --expunge
echo_and_run rm -rf node_modules
echo_and_run rm -rf `find . -type d -name node_modules -prune`
)
done
2 changes: 1 addition & 1 deletion scripts/clean_examples.sh
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,6 @@ for example in ${EXAMPLES[@]} ; do
printf "\n\nCleaning example ${example}\n"
${RULES_NODEJS_DIR}/scripts/unlink_deps.sh
echo_and_run bazel clean --expunge
echo_and_run rm -rf node_modules
echo_and_run rm -rf `find . -type d -name node_modules -prune`
)
done
2 changes: 1 addition & 1 deletion scripts/clean_packages.sh
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,6 @@ for package in ${PACKAGES[@]} ; do
printf "\n\nCleaning package ${package}\n"
${RULES_NODEJS_DIR}/scripts/unlink_deps.sh
echo_and_run bazel clean --expunge
echo_and_run rm -rf node_modules
echo_and_run rm -rf `find . -type d -name node_modules -prune`
)
done

0 comments on commit 54db71e

Please sign in to comment.