Skip to content

Instantly share code, notes, and snippets.

@suisho
Created February 20, 2013 16:13
Show Gist options
  • Save suisho/4996706 to your computer and use it in GitHub Desktop.
Save suisho/4996706 to your computer and use it in GitHub Desktop.
Load hubot script recursive directory
# Description:
# Load script recursively
# Dependences:
# "glob": "~3.1.20"
Path = require "path"
Glob = require "glob"
module.exports = (robot) ->
robot.logger.info "read sub dir"
dirs = Glob.sync(__dirname+"/**/*/")
for dir in dirs
robot.load dir
@peterrus
Copy link

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment