Skip to content

Commit

Permalink
the start of a npm
Browse files Browse the repository at this point in the history
  • Loading branch information
GMali committed Sep 16, 2012
0 parents commit 88f4217
Show file tree
Hide file tree
Showing 8 changed files with 59 additions and 0 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
node_modules
4 changes: 4 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
test:
@./node_modules/.bin/mocha -u bdd --reporter landing --require should

.PHONY: test
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# uReddit
Empty file added bin/uReddit.js
Empty file.
Empty file added lib/main.js
Empty file.
15 changes: 15 additions & 0 deletions lib/uReddit.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
var defaults = {
id: 23
};

function Bar(){
return "hey";
};

exports.Bar = Bar;
exports.defaults = defaults;


// exports.Bar = function(text){
// return text + text;
// };
19 changes: 19 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
{
"name": "uReddit",
"version": "0.0.1",
"description": "API Wrapper for the University of Reddit",
"main": "./lib/main",
"bin": {
"uReddit": "./bin/uReddit.js"
},
"dependencies": {},
"devDependencies": {
"mocha": "0.3.x",
"should": "1.1.x"
},
"scripts": {
"test": "make test"
},
"repository": "",
"author": "Gaurav Mali <hello@gauravmali.com>"
}
19 changes: 19 additions & 0 deletions test/test.trial.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
var mocha = require('mocha');
var should = require('should');
var Bar = require('../lib/uReddit.js').Bar
var def = require('../lib/uReddit.js').defaults


describe('Testing Bar', function() {

describe('Default', function() {
it('should have a property ID', function() {
def.should.have.property('id');
});

it('should say hey', function(){
var foo = Bar();
foo.should.equal("hey");
});
});
});

0 comments on commit 88f4217

Please sign in to comment.