Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Callum Rogers
committed
Sep 6, 2011
0 parents
commit ed7281f
Showing
6 changed files
with
52 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
node_modules/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
#!/bin/sh | ||
|
||
# See https://github.com/CRogers/FileWatcher | ||
|
||
filewatcher "src/" "*.coffee" "coffee -o lib/ -c :path" "rm lib/:wefile.js" | ||
# filewatcher "tests/" "*.coffee" "coffee -o tests/ -c :path" "rm tests/:wefile.js" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
exports = require('./lib/omegle') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
(function() { | ||
var EventEmitter, Omegle; | ||
EventEmitter = require('events').EventEmitter; | ||
Omegle = (function() { | ||
function Omegle() { | ||
EventEmitter.call(this); | ||
} | ||
Omegle.prototype.connect = function() { | ||
return this.emit('connected'); | ||
}; | ||
Omegle.prototype.say = function(text) {}; | ||
Omegle.prototype.disconnect = function() { | ||
return this.emit('disconnected'); | ||
}; | ||
return Omegle; | ||
})(); | ||
Omegle.prototype = Object.create(EventEmitter.prototype.prototype); | ||
}).call(this); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
{ | ||
"name": "omegle", | ||
"description": "A library to connect with and chat to people on omegle", | ||
"keywords": ["omegle", "chat"], | ||
"homepage": "https://github.com/CRogers/omegle", | ||
"main" : "./lib/omegle", | ||
"author": "Callum Rogers <callumrogers@hotmail.co.uk>", | ||
"version": "0.0.1" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
EventEmitter = require('events').EventEmitter | ||
|
||
class Omegle | ||
constructor: -> | ||
# call the super constructor | ||
EventEmitter.call this | ||
|
||
connect: -> | ||
@emit('connected') | ||
|
||
say: (text) -> | ||
|
||
disconnect: -> | ||
@emit('disconnected') | ||
|
||
# get on and emit classes | ||
Omegle:: = Object.create EventEmitter.prototype:: |