Home » Learning Moment » It’s Link Magic

It’s Link Magic

I’ve done a little bit of web development with Node but am by no means an expert (…yet…as will become obvious throughout the course of this blog) and am still learning the In’s and Out’s of NPM. The project I was assigned to when I joined the company is well on its way and is actually being deployed next week. Anyway, there is no jQuery being used anywhere in the app but an attachments dependency we are using, maintained by our company, has jQuery required as a dependency. Rather than include jQuery in our project, we made a pull request on the attachment dependency with the jQuery removed. Since we couldn’t include it in our package.json until our modified version got merged in and a demo in a couple hours, we wanted to find a way to use the modified version and get our app in a working state. So, we downloaded the branch with the changes on it, and used  npm link  to link the downloaded dependency to our project. With a couple lines of code, we had the modified dependency working with our project as if it was sourced straight from the package.json and were ready for the demo. I thought that was pretty cool!

Advertisements

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 )

Twitter picture

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

Facebook photo

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

Google+ photo

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

Connecting to %s