7 Bash Scripts Every Frontend Dev Should Keep in Their Toolbox
Intro The Pragmatic Programmer is one of the best programming books I've ever read. I love it because it's not just about coding, but about being a better programmer. The book is a gem, and if you haven't had a chance to read it, I highly recommend it. One of the MANY takeaways I got from it was the idea of having a personal "toolbox" of scripts and utilities that you can use to make your life easier. So, I figured it'd be a great starting point for others that aren't sure about what types of scripts to build. So I've made a small list of scripts that anyone could take advantage of. Whether you're building UIs, spinning up mock APIs, or just trying to keep your node_modules from sitting out too long and getting stale. Note: These scripts are built for a Next.js + yarn project. It's very easy to adapt them to your own needs. Let’s dive in: 1. flush.sh: Nuke node_modules and Reinstall I can't tell you how often I'm updating dependencies and have to manually delete node_modules, .next, and dist folders. This script does it for me. #!/bin/bash echo "

Intro
The Pragmatic Programmer is one of the best programming books I've ever read. I love it because it's not just about coding, but about being a better programmer. The book is a gem, and if you haven't had a chance to read it, I highly recommend it. One of the MANY takeaways I got from it was the idea of having a personal "toolbox" of scripts and utilities that you can use to make your life easier.
So, I figured it'd be a great starting point for others that aren't sure about what types of scripts to build. So I've made a small list of scripts that anyone could take advantage of. Whether you're building UIs, spinning up mock APIs, or just trying to keep your node_modules
from sitting out too long and getting stale.
Note: These scripts are built for a Next.js + yarn project. It's very easy to adapt them to your own needs.
Let’s dive in:
1. flush.sh
: Nuke node_modules
and Reinstall
I can't tell you how often I'm updating dependencies and have to manually delete node_modules
, .next
, and dist
folders. This script does it for me.
#!/bin/bash
echo "