I have many pieces of JS and shared by several projects. I must either copy them to one file for each project, or use them as separate files in cdn. Both are bad ideas.
Is there any dependency management and assembly tool like Maven for JavaScript? Ideally, this will require a set of js dependencies and build a single js file that can be served on cdn.
I can write a script for this. But I'm looking to find something comparable to Maven for JS.
Update 2014: Based on the answers here, and my next research is the most popular tools:
Bower, NPM, RequireJS, Browserify, Webpack, Grunt, Gulp
Ali shakiba
source share