Skip to content
Browse files

More tweaks

  • Loading branch information...
1 parent 0760b3b commit af8f1faf49f85fbc599b146a91a490d33451c850 @nhunzaker committed Feb 10, 2012
Showing with 14 additions and 6 deletions.
  1. +2 −2 actions/compile/javascript.js
  2. +1 −1 bin/nodebot
  3. +6 −2 brain/interaction.js
  4. +3 −1 package.json
  5. +2 −0 server/public/javascripts/nodebot.js
View
4 actions/compile/javascript.js
@@ -76,7 +76,7 @@ function compress (filename, content) {
// Add the records
ret += "\/\/ " + filename;
- ret += "\n" + pro.gen_code(content) + "\n\n";
+ ret += "\n" + pro.gen_code(content) + ";\n\n";
return ret;
@@ -111,7 +111,7 @@ function compressAll (directory, files, filename) {
;
files.forEach(function(f) {
- output += compress(f.filename, f.content) + ";";
+ output += compress(f.filename, f.content);
});
return output;
View
2 bin/nodebot
@@ -2,4 +2,4 @@
require("../nodebot.js");
-Nodebot.boot();
+Nodebot.boot(process.argv[2] === "-s");
View
8 brain/interaction.js
@@ -36,8 +36,12 @@ module.exports = function add_interaction_module(context) {
nodebot.say = function() {
var message = util.format.apply(null, arguments);
- console.log(nodebot.lexicon.nodebot.name.magenta.bold + ": " + message);
- nodebot.io && nodebot.io.sockets.emit('output', message);
+
+ if (nodebot.io) {
+ nodebot.io.sockets.emit('output', message);
+ } else {
+ console.log(nodebot.lexicon.nodebot.name.magenta.bold + ": " + message);
+ }
return this;
};
View
4 package.json
@@ -20,7 +20,9 @@
"speakeasy-nlp" : "*",
"flatiron" : "*",
"connect" : "*",
- "socket.io" : "*"
+ "socket.io" : "*",
+ "union" : "*",
+ "plates" : "*"
},
"author": "Nate Hunzaker",
View
2 server/public/javascripts/nodebot.js
@@ -10,6 +10,8 @@ $(document).ready(function() {
$("form").submit(function(e) {
e.preventDefault();
socket.emit("input", $("#question").val());
+
+ $("#question").val("").focus();
});
});

0 comments on commit af8f1fa

Please sign in to comment.
Something went wrong with that request. Please try again.