Using git repos as npm dependencies

Sequelize + Express + ? = Happiness

I want to use sequelize/sequelize-restful as I’m using express 4 and really didn’t want to have to base my app on restify (and for the bigger reason that I’m sick of writing boiler-plate api routes¹).  But sequelize-restful is no longer maintained. It’s a simple little library and quite nicely written but it causes sequelize to throw up some deprecation warnings and I wanted to get rid of this (and future proof²).

So I forked it… Nightmare, now I can’t npm install sequelize-restful --save this and I’m going to end up with a random hard copied dependencies in my otherwise Da Vinci like masterpiece of a code base [sarcasm].

But no, someone thought of this, and it defaults to github npm install kaidoe/sequlize-restful --save creates a package.json entry like so:

"dependencies": {
"sequelize-restful": "git://github.com/kaidoe/sequelize-restful"

Sequelize + Express+ ((Open Source Fork) * (npm/ github)) = Happiness

¹ It’s generally good practice when writing to put the bigger more relevant reason in brackets, after the fact.
² Like this.


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s