By Spencer Norman

Meteor is an awesome new JS framework for rapidly building real-time applications.

I recently built an app with it in “54 hours” at Startup Weekend Colorado Springs. We aren’t quite ready to release to the public yet, but I thought I would share some insights that I learned while building my first Meteor app.

First insight – Meteor is great.

Second insight Рyou should install Meteorite before you do anything else with meteor. Meteorite is a package manager for Meteor that is on track to be included in the core by 1.0 Meteorite allows you to install community packages from Atmosphere. This adds an enormous amount of functionality to core Meteor, but sometimes you still need to add your own package.

We can cut some slack to both of these, because they are new and awesome, but the documentation is sparse at best. One of the things I found I needed to do shortly after creating the app, was to include a package that I had forked from an atmosphere package. To do this there are a few steps, some obvious and some not.

Let’s add a local package to Meteor

Step 1: Add package path to smart.json file

To have Meteor load a local package you need to add the package and path to your smart.json file like so:

One of the nuances that wasn’t obvious to me initially is that this path does not have to be in your project directory. It can be anywhere on your local system, so long as you get the path right. Meteor will then load that file (instead of using one from Atmosphere, etc) when it “installs” your packages.

Step 2: Add package to Meteor with mrt

This step eluded me for a little while, I figured that because I had added the package to smart.json that it would automatically add it to my project. I’m unclear as to the exact design of this process, but for me unless I added the package to meteor, it wouldn’t work. Add it to meteor like so:

$ mrt add mixpanel


Now just use the package as you would use a package you got off of Atmosphere.

I’m still pretty new to Meteor – I’ve been hacking on it since around Friday at 6:00pm, so if I’ve borked anything up major, please let me know in the comments. There may be a better way to do any of this, for me this is what it took to get my slightly customized version of Mixpanel working.