Help us understand the problem. What is going on with this article?

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

More than 5 years have passed since last update.

問題

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",
  }
}

https://github.com/bouzuya/hubot-script-boilerplate/blob/1dd356a34e34f63cfd14ba109d523c89f3f9e3fa/package.json#L45

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

以上

bouzuya
ぼく、ぼうずや。なさけはひとのためならず。たのしいはせいぎ。
http://bouzuya.net/
Why not register and get more from Qiita?
  1. We will deliver articles that match you
    By following users and tags, you can catch up information on technical fields that you are interested in as a whole
  2. you can read useful information later efficiently
    By "stocking" the articles you like, you can search right away
Comments
No comments
Sign up for free and join this conversation.
If you already have a Qiita account
Why do not you register as a user and use Qiita more conveniently?
You need to log in to use this function. Qiita can be used more conveniently after logging in.
You seem to be reading articles frequently this month. Qiita can be used more conveniently after logging in.
  1. We will deliver articles that match you
    By following users and tags, you can catch up information on technical fields that you are interested in as a whole
  2. you can read useful information later efficiently
    By "stocking" the articles you like, you can search right away
ユーザーは見つかりませんでした