Skip to content

Commit

Permalink
First commit
Browse files Browse the repository at this point in the history
  • Loading branch information
Callum Rogers committed Sep 6, 2011
0 parents commit ed7281f
Show file tree
Hide file tree
Showing 6 changed files with 52 additions and 0 deletions.
1 change: 1 addition & 0 deletions .gitignore
@@ -0,0 +1 @@
node_modules/
6 changes: 6 additions & 0 deletions autocompiler.sh
@@ -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"
1 change: 1 addition & 0 deletions index.js
@@ -0,0 +1 @@
exports = require('./lib/omegle')
18 changes: 18 additions & 0 deletions lib/omegle.js
@@ -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);
9 changes: 9 additions & 0 deletions package.json
@@ -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"
}
17 changes: 17 additions & 0 deletions src/omegle.coffee
@@ -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::

0 comments on commit ed7281f

Please sign in to comment.