There's a tool called `gron` designed for workflows like this, I've found it incredibly useful.
https://news.ycombinator.com/item?id=16727665 https://github.com/tomnomnom/gron/