#!/bin/bash
# rm-node-modules {pathname}

pathname="$1"

find "$pathname" -type d -name 'node_modules' -exec rm -rf {} +
