Skip to content

Commit

Permalink
make hubot easier for first timers
Browse files Browse the repository at this point in the history
  • Loading branch information
atmos committed Oct 24, 2011
1 parent 494f668 commit 2b432ff
Show file tree
Hide file tree
Showing 6 changed files with 21 additions and 16 deletions.
4 changes: 4 additions & 0 deletions Makefile
Expand Up @@ -7,6 +7,10 @@ dev: generate-js
generate-js:
@find src -name '*.coffee' | xargs coffee -c -o lib

package:
@bin/hubot -c hubot
@chmod 0755 hubot/bin/hubot

remove-js:
@rm -fr lib/

Expand Down
21 changes: 8 additions & 13 deletions README.md
Expand Up @@ -6,26 +6,21 @@ You'll probably never have to hack on this repo directly. Instead this
repo provides a library that's distributed by npm that you simply
require in your project.

We provide a generator to help you get a hubot going very quickly.

## Getting Your Own

Make sure you have [node.js](http://nodejs.org/), [npm](http://npmjs.org/), [redis](http://redis.io/),
and [coffee-script](http://jashkenas.github.com/coffee-script/#installation) installed. Clone this repository, and run these commands:
Make sure you have [node.js](http://nodejs.org/) and [npm](http://npmjs.org/) installed.

% npm install -g
% hubot -c ~/my_bot

This comment has been minimized.

Copy link
@holman

holman Nov 1, 2011

Contributor

Don't we still need a reference to hubot -c in the README?

Download the [latest version of hubot](https://github.com/github/hubot/downloads).

Then follow the instructions in the README in the `~/my_bot` directory.
Then follow the instructions in the README in the `hubot` directory.

## Scripts

Hubot ships with a couple of default scripts, but there's a whole big world out
there in the [hubot-scripts](https://github.com/github/hubot-scripts)
repository. `hubot-scripts` is a way to share scripts with the entire
community. Check out the
[README](https://github.com/github/hubot-scripts#readme) for more help on
installing individual scripts.
Hubot ships with a couple of default scripts, but there's a growing
number of extras in the [hubot-scripts](https://github.com/github/hubot-scripts)
repository. `hubot-scripts` is a way to share scripts with the entire
community. Check out the [README](https://github.com/github/hubot-scripts#readme)
for more help on installing individual scripts.

## Local Testing

Expand Down
3 changes: 2 additions & 1 deletion src/creator.coffee
Expand Up @@ -47,11 +47,12 @@ class Creator
console.log "Creating a hubot install at #{@path}"

@mkdirDashP(@path)
@mkdirDashP("#{@path}/bin")
@mkdirDashP("#{@path}/scripts")

@copyDefaultScripts("#{@path}/scripts")

["Procfile", "package.json", "README.md", ".gitignore"].forEach (file) =>
["Procfile", "package.json", "README.md", ".gitignore", "bin/hubot"].forEach (file) =>
@copy "#{@templateDir}/#{file}", "#{@path}/#{file}"

exports.Creator = Creator
1 change: 1 addition & 0 deletions src/robot.coffee
Expand Up @@ -50,6 +50,7 @@ class Robot
else
newRegex = new RegExp("^#{@name}:?\\s*#{pattern}", modifiers)

console.log newRegex.toString()
@listeners.push new Listener(@, newRegex, callback)

# Public: Passes the given message to any interested Listeners.
Expand Down
3 changes: 1 addition & 2 deletions src/templates/README.md
Expand Up @@ -11,8 +11,7 @@ Playing with Hubot
You'll need to install the necessary dependencies for hubot. All of
those dependencies are provided by [npm](http://npmjs.org).

% npm install -g hubot
% hubot
% bin/hubot

You'll see some startup output about where your scripts come from.

Expand Down
5 changes: 5 additions & 0 deletions src/templates/bin/hubot
@@ -0,0 +1,5 @@
#!/bin/sh

npm install

node_modules/.bin/hubot

0 comments on commit 2b432ff

Please sign in to comment.