hubot-vsphere-commands
Version:
A hubot script that allows users to interact with the vsphere-rest-api developed by quickjp2 on github.
12 lines (10 loc) • 381 B
text/coffeescript
fs = require 'fs'
path = require 'path'
module.exports = (robot, scripts) ->
scriptsPath = path.resolve(__dirname, 'src')
if fs.existsSync scriptsPath
for script in fs.readdirSync(scriptsPath).sort()
if scripts? and '*' not in scripts
robot.loadFile(scriptsPath, script) if script in scripts
else
robot.loadFile(scriptsPath, script)