hubot-config

v1.0.1
A configuration management library for Hubot
hubot hubot-scripts

hubot-config

A configuration management library for Hubot

Installation

$ npm install --save hubot-config

Usage

parseConfig = require 'hubot-config'

config = parseConfig 'hello',       # 'hello' is script name ( hubot-hello )
  message: 'world'                  # process.env.HUBOT_HELLO_MESSAGE ? 'world'
  friendlyMessage: null             # process.env.HUBOT_HELLO_FRIENDLY_MESSAGE ? null

module.exports = (robot) ->
  robot.respond /hello/, (msg) ->
    msg.send config.message

  robot.respond /hi/, (msg) ->
    msg.send config.friendlyMessage

License

MIT

Author

bouzuya <[email protected]> (http://bouzuya.net)

Badges

Build Status Dependencies status Coverage Status

npm i hubot-config

Metadata

  • MIT
  • Whatever
  • bouzuya
  • released 12/28/2014

Downloads

Maintainers