You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Interesting - probably not is my guess. I'm imagining working on some code and creating a new branch to put it in but perhaps don't want it blown away. The hanging folders feels safe because it's just a lonely node_modules with no package.json.
Copying the code here in case the history gets deleted:
.husky/post-checkout
#!/bin/sh."$(dirname "$0")/_/husky.sh"# If this is a file checkout (== 0) exit.if [ "$3"=="0" ];thenexit;fi# If this is a branch checkout (== 1) continue...# For each element, check for a node_modules dir without a corresponding# package.json. That indicates the element does not exist in this branch.forein {packages,projects,tools}/*;doif [[ -d$e/node_modules &&!( -f $e/package.json ) ]];then# Safe to delete this folder
rm -rf $efidoneexit 0
I just snagged the leftover component script for Spectrum and applied it to the post-checkout git hook via husky: adobe/spectrum-web-components#2439
Thought you might be interested in adding the same! I can open a PR if you want.
The text was updated successfully, but these errors were encountered: