Build, compile javascript library

I got a javascript library which currently uses requirejs.

To keep things readable I have structered everything into directories. I would now like to compile all modules together into one javascript file for production but make the files still workable without compilation for developing so that I do not have to recompile everything when I test something.

How do I accomplish this task?