Java has maven or ivy to retrieve dependent jars from various public repositories.
Ruby has even better dependency retrieval tools: gem and bundle.
Does the Javascript community have any equivalent tool? I have found a number of tools to manage dynamically loading dependencies into the browser. I am NOT looking for those tools.
Specifically, I am looking for a tool that a new developer uses to retrieve the javascript files they need. The developer runs this tool and:
After all this, the developer has a local copy of all the js/css files needed.
If a new tiny_mce or jquery comes out, the project file is updated and the developers just return the tool and they get all the new files.
If no version of a js library is specified then the latest release version is retrieved.
What I have just described is what maven/ivy/gem does in the java/ruby space.
Obviously, I could rig something up for my own needs with maven but does the javascript community have anything already in place?
Update:
npm was mentioned by Raynos. Npm is centered around node.js ( which is o.k. ). However, there are limited published libraries in the public repository and limited metadata ( version, author, project url is missing from easy discovery ).
However, it looks like npm is the solution today. Unfortunately, it will not quite be enough for us, but such is life.
I am actually pretty surprised that jquery or google-closure does not have a project management tool. (Tell me if I am wrong!)
Update: Now meteor has come along with meteorite to access and update the atmosphere libraries. Much awesomeness.
JavaScript Maven Plugin is a multi-purpose build manager for Javascript projects. It brings two new packaging types javascript and titanium to build standalone JavaScript libraries and Titanium Appcelerator™ applications. It also integrate in war projects for integration in web applications.
A dependency is some third-party code that your application depends on. Just like a child depends on its parent, your application depends on other people's code. A piece of code becomes a true dependency when your own application cannot function without it.
Pip installs system and project-level Python packages. Maven manages dependencies and the build process for Java projects.
Maven is the most popular build and dependency resolution tool for Java, just like NPM is for JS. But it's not just the same tool for a different language.
it looks like twitter is offering one answer :
cf. https://github.com/twitter/bower#readme
Bower (using Node and npm) is a package manager for the web. Bower lets you easily install assets such as images, CSS and JavaScript, and manages dependencies for you.
Bower is a generic tool which will resolve dependencies and lock packages down to a version. It runs over Git, and is package-agnostic. A package may contain JavaScript, CSS, images, etc., and doesn't rely on any particular transport (AMD, CommonJS, etc.).
Bower then makes available a simple programmatic API which exposes the package dependency model, so that existing build tools (like Sprockets, LoadBuilder, curls.js, Ender, etc.) can consume it and build files accordingly.
This depends on your server-side stack. Most dependency / package managers for server-side stacks also deal with javascript based dependencies.
npm
is the node.js dependency manager. It's very popular.
It's based on the CommonJS package.json format.
There are movements to port this to the client like:
You can't really do this with JavaScript alone as it has no IO in it. Even ender's command line tool relies on npm being installed. You should just use whatever tool comes with your server-side stack
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With