bruz / meteor-github-api

node-github package adapted for Meteor
7 stars 4 forks source link

adapt readme to latest versions of meteor #2

Closed SylvainBigonneau closed 9 years ago

SylvainBigonneau commented 9 years ago

Given this issue on StackOverflow, the package's description should be updated (on atmosphere as well) to correspond to the new way to add it and require it into your project.

bruz commented 9 years ago

Thanks for taking the time to submit this!

I think the require line was left over from when I first forked this package, because I never do any sort of require in the app where I'm using it. Here's an example where Npm.require isn't needed: http://meteorpad.com/pad/WbG4PtMsBZDuSartS/github-api%20test. In fact, if I try to use Npm.require I get an error:

Exception while invoking method 'getFollowing' Error: Cannot find module 'github-api'                    

I'm trying to figure out what context the Npm.require is needed in, since from the StackOverflow issue it appears necessary. Is there something I'm missing?

kalarani commented 9 years ago

@bruz I encountered the same issue 'require' is not defined when i tried to access github using this package.

After following the example you posted, I'm able to make use of this api. It'd help if you can update the readme, by removing the following line.

var GitHub = require("github");

SylvainBigonneau commented 9 years ago

Actually yes, it turns out the only problem was probably the presence of the require statement in the first place. I was not the person having the issue on StackOverflow so I cannot be sure he or she tried to just remove this statement. Anyway, I adapted my pull request according to @kalarani's input.

bruz commented 9 years ago

Perfect - thanks @BraveKenny!