daggumnpm: a friendly bash utility

Update: there is an updated version of this at /2016/05/11/reinstall-daggumnpm/

No matter what version of npm you use, you likely have had to destroy your node_modules folder and do a clean npm install to debug some issue. This likely isn’t exclusive to npm either, but any package manager. Regardless, here’s a quick friendly bash script to reinstall your node_modules fresh, let you know when it’s done, and automatically run the previous command.

alias daggumnpm='rm -rf node_modules && npm i && say "Rerunning `!!` && !!'

If you’ve used node at all the first two commands should be straightforward.