Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

More tweaks

  • Loading branch information...
commit af8f1faf49f85fbc599b146a91a490d33451c850 1 parent 0760b3b
@nhunzaker authored
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();
});
});
Please sign in to comment.
Something went wrong with that request. Please try again.