Thanks. I should have said in the original question but I am using 4.8 so this won't work. Sounds like Noah's solution is the way to go unless there is the Web Optimizer for 4.x
In addition to the Web Optimizer, I would also recommend npm and webpack if you are working with the 4.x version of the API, and bower if you are working with the 3.x version of the API.
Hope this helps.