I have a project that has:
I'm just going to use this as a stub because I've been looking to do a similar thing, and I will return later to enrich my answer. In the meantime you should look up JHipster. Though they have a much larger stack, and their stack is already built, they are essentially doing what I think you want within their build process.
Though I do not agree completely with their build process I will return to explain why and what I am doing in projects I am currently working on.