This morning (which now seems like a reallong time ago), I tweeted about how spoiled I am with npm and package management in general. If you've never experienced this, let me give you a real quick, rough idea of what this means as a developer.
I needed to add email support to a Node.js project I'm building (javascriptcookbook.com - almost done - honest!). Once I found the name of the package I needed, I modified my package.json file. The package.json file, for Node apps, is like a metadata file for your application. Here is how it looked before I changed it:
To add my email package, I added one line.
In Terminal, I typed npm install, hit enter, and that was it. The npm command line took care of grabbing "nodemailer" and seeing what it needed. It then grabbed those resources. And oh yeah, if that crap needed something it got that too. All while ensuring it didn't re-download anything it didn't need to.
Yeah, I really freaking dig that. As I said in the beginning, I'm getting spoiled by it. After tweeting about it though a few friends replied and mentioned the Ramen project by Adam Tuttle: https://github.com/CFCommunity/ramen
While not the exact same, it is pretty cool to see something like this being built for ColdFusion developers. You can see it in action below.
Ramen: An Integrated Installer for ColdFusion 8+ from Adam Tuttle on Vimeo.
Archived Comments
Thanks for the mention.
npm install -- save nodemailer
That will take care of adding it to your package.json for you.
That should be "npm install --save nodemailer"... Hard to get little details like that right on a phone keyboard.
I keep forgetting it can auto add too. I don't know - I just like typing it into package.json first. Feels safer.
at SOTR mark drew showed off railos future package manger as part of the command line interface, I know you're a cf man, but something for adobe to copy perhaps
You can also use --save-dev if it is a devDependency (instead of --save)
Going to check out Ramen. I've thought for a while that CF needed something similar. Great to see someone working on it. Thanks for the link Ray!