Skip to content
Browse files

First commit

  • Loading branch information...
0 parents commit ed7281f708b15cecd5ef7c668d30db4e8c032f6e @CRogers committed Sep 6, 2011
Showing with 52 additions and 0 deletions.
  1. +1 −0 .gitignore
  2. +6 −0 autocompiler.sh
  3. +1 −0 index.js
  4. +18 −0 lib/omegle.js
  5. +9 −0 package.json
  6. +17 −0 src/omegle.coffee
1 .gitignore
@@ -0,0 +1 @@
+node_modules/
6 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 index.js
@@ -0,0 +1 @@
+exports = require('./lib/omegle')
18 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 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 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.
Something went wrong with that request. Please try again.