3

我已经建立了一个hubot服务器,版本2.7.1。这是我的依赖项部分package.json

"dependencies": {
  "hubot": ">= 2.6.0 < 3.0.0",
  "hubot-scripts": ">= 2.5.0 < 3.0.0",
  "hubot-hipchat": "~2.6.4"
},

当它启动时,它会加载脚本,scripts/但似乎忽略了我放入的集合hubot-scripts.json。这是该文件的第一部分:

["shipit.coffee", "sudo", "9gag", "abstract"

使用详细的启动日志,您可以看到包含 shipit.coffee(默认值之一),但其余都不是:

[Tue Feb 25 2014 10:59:46 GMT-0800 (PST)] DEBUG Loading hubot-scripts from /path/node_modules/hubot-scripts/src/scripts
[Tue Feb 25 2014 10:59:46 GMT-0800 (PST)] DEBUG Parsing help for /path/node_modules/hubot-scripts/src/scripts/shipit.coffee
[Tue Feb 25 2014 10:59:46 GMT-0800 (PST)] DEBUG Loading external-scripts from npm packages

目录中大约有 460 个文件node_modules/hubot-scripts/src/scripts/,其中包括我的文件中给出的四个hubot-scripts.json。我只能假设它没有读取该文件..或其他东西。

这个文档差异让我觉得我没有错过任何东西,还有一个老问题在很久以前也被修补过。

4

1 回答 1

7

尝试将.coffee扩展名添加到您的所有脚本名称中hubot-scripts.json

["shipit.coffee", "sudo.coffee", "9gag.coffee", "abstract.coffee"
于 2014-02-26T19:21:52.717 回答