Comparing version
17
index.js
@@ -68,3 +68,3 @@ #! /usr/bin/env node | ||
rl.setPrompt(`ick${langInfo.file_extension}:${counter}> `); | ||
rl.setPrompt(chalk.blue(`ick${langInfo.file_extension}:${counter}> `)); | ||
rl.prompt(); | ||
@@ -107,2 +107,13 @@ | ||
const errorReplies = childMessages | ||
.filter(msg => msg.header.msg_type === 'error') | ||
.map(msg => msg.content); | ||
const errorStream = Rx.Observable | ||
.merge(errorReplies, executeReply.filter(x => x.status === 'error')); | ||
errorStream.subscribe(err => { | ||
process.stdout.write(`${err.ename}: ${err.evalue}\n`); | ||
process.stdout.write(err.traceback.join('\n')); | ||
}); | ||
streamReply.subscribe(content => { | ||
@@ -153,3 +164,3 @@ switch(content.name) { | ||
.subscribe(() => { | ||
rl.setPrompt(`ick${langInfo.file_extension}:${counter}> `); | ||
rl.setPrompt(chalk.blue(`ick${langInfo.file_extension}:${counter}> `)); | ||
rl.prompt(); | ||
@@ -175,3 +186,3 @@ }, console.error); | ||
kernelReply.subscribe(content => { | ||
process.stdout.write(chalk.green(content.banner)); | ||
process.stdout.write(chalk.gray(content.banner)); | ||
startREPL(content.language_info); | ||
@@ -178,0 +189,0 @@ }); |
{ | ||
"name": "ick", | ||
"version": "0.1.2", | ||
"version": "0.2.0", | ||
"description": "Interactive Console Experiment", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
10351
4.86%161
5.92%