Skip to content

Instantly share code, notes, and snippets.

@andrewlazenka
Created January 10, 2022 17:21
Show Gist options
  • Save andrewlazenka/aaa3811d20c2ed1527e66f10a4572f4d to your computer and use it in GitHub Desktop.
Save andrewlazenka/aaa3811d20c2ed1527e66f10a4572f4d to your computer and use it in GitHub Desktop.
Remove node_modules & lockfiles
function node-clean() {
if test -f ./yarn.lock; then
rm ./yarn.lock
echo "Removed Yarn Lock"
fi
if test -f ./package-lock.json; then
rm ./package-lock.json
echo "Removed Package Lock"
fi
if test -d ./node_modules; then
rm -rf ./node_modules
echo "Removed Node Modules"
fi
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment