Dependency-driven self-building JS library
<p>(I hope the question title is rather explanatory than misleading..)</p>

<p>I wonder if there is a JavaScript library/framework out there, which would parse and analyze the JS code written by web developer, and then synthesize the minimal necessary subset of the library into a single JS file, intended for deployment with this specific web app.</p>
