Skip to content

Instantly share code, notes, and snippets.

@cpsubrian
Created February 25, 2012 03:34
Show Gist options
  • Save cpsubrian/1905894 to your computer and use it in GitHub Desktop.
Save cpsubrian/1905894 to your computer and use it in GitHub Desktop.
Workign on a repl
cpsubrian@blink ~/projects/node/gac (master)
$ cake repl
--------------------------
____ _ ____
/ ___| / \ / ___|
| | _ / _ \| |
| |_| |/ ___ \ |___
\____/_/ \_\____|
GAC REPL - try 'help'
--------------------------
node.js:201
throw e; // process.nextTick error, or 'error' event on first tick
^
Error: write EBADF
at errnoException (net.js:646:11)
at Object.afterWrite [as oncomplete] (net.js:480:18)
# Module dependencies.
require 'colors'
# Setup the command.
module.exports = () ->
gac = new REPL()
###
# GAC REPL Class.
###
class REPL
constructor: () ->
ascii = """
--------------------------
____ _ ____
/ ___| / \\ / ___|
| | _ / _ \\| |
| |_| |/ ___ \\ |___
\\____/_/ \\_\\____|
GAC REPL - try 'help'
--------------------------
"""
console.log ascii.blue
# Start the repl.
require('repl').start('> ', process.stdin, @eval)
eval: (cmd, callback) =>
console.log 'I am the eval function'
callback null, 'Result'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment