This is a custom version of GitHub's Campfire bot, hubot. It is specifically refactored to work with Visual Studio and to allow you to debug Hubot.
-
Install Node.js http://nodejs.org/download/
-
Install Visual Studio 2013 http://www.visualstudio.com/
-
Install Node.js Tools for Visual Studio 2013 https://nodejstools.codeplex.com/
-
Install Web Essentials for Visual Studio 2013 (This extension lets you transpile coffee script) http://visualstudiogallery.msdn.microsoft.com/56633663-6799-41d7-9df7-0f2a504ca361
-
Edit SetHubotSettings.ps1 to fit your needs and run it with admin privs (The script will set the environment variables used by Hubot)
-
Open Node.js Command Prompt and run :
npm install -g hubot coffee-script
This will add both hubot and coffee-script as global node.js references
-
Navigate to
C:\Users\"YourUsername"\AppData\Roaming\npm\node_modules\hubot\src
Modify line 213 of the robot.coffee file to :
if ext is '.coffee'
This will only load coffee scripts when you run Hubot (instead of coffee script and javascript, which results in duplicates)
- Start the Hubot node.js project (Located in the hubot root folder)
- If asked if you want to save changes to devenv.sln say No
- Put a break point in the js file of script you want to debug Example : ping.coffee has a corresponding ping.js file. Put a break point on line 4 robot.respond(/PING$/i, function(msg)
- Run the project it will start Hubot in Node.js Command Line
- Type in "hubot ping"
- You should see the breakpoint(from Step 3) get hit
- Start Node js command prompt
- Navigate to hubot root (The directory where you checked out hubot)
- Type in "hubot" (this will start hubot in command line mode)
- Type in "hubot help" to see available commands
- Start Node js command prompt
- Navigate to hubot root (The directory where you checked out hubot)
- Type in "hubot -a campfire --name igor" (where name is the name you want the bot to respond to)
- Hubot should now appear in your chatroom
- Type "igor help" in the campfire to see all the command options
To add additional functionality to hubot:
- Copy one of the coffee scripts (Note that some of the scripts might require additional packages, you can add those by doing a npm install in hubotRoot) from hubotRoot\node_modules\hubot-scripts\src\scripts to hubotRoot\scripts
- Restart hubot