LoginSignup
2
3

More than 5 years have passed since last update.

Hubot の動作確認のための npm run-script 「npm run robot」のすすめ

Posted at

問題

Hubot の動作確認をしたい。しかしコマンドを入力するのは面倒だ。

解決策

npm run-script を活用する。事前に npm run-script として登録しておくことで入力の手間を省くことができる。

以下に @bouzuyanpm run robot の登録・利用例を示す。

1. package.jsonnpm run-script として Shell アダプターで動作する Hubot コマンドを robot という名前で登録する。

package.json
{
  "scripts": {
    "robot": "HUBOT_SHELL_USER_NAME='bouzuya' hubot --adapter shell --name hubot",
  }
}

2. 動作確認したい場合には npm run robot を実行する。

以上

2
3
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
2
3