我很想通过 Zeus 环境运行我的 Thor 命令。有没有人设法做到这一点?
有人提到您可以在thor.json
文件中添加命令,
http://railscasts.com/episodes/412-fast-rails-commands ?view=comments
但我不太明白这意味着什么。thor.json
我在 thor 的文档中找不到任何参考。
我很想通过 Zeus 环境运行我的 Thor 命令。有没有人设法做到这一点?
有人提到您可以在thor.json
文件中添加命令,
http://railscasts.com/episodes/412-fast-rails-commands ?view=comments
但我不太明白这意味着什么。thor.json
我在 thor 的文档中找不到任何参考。
我设法弄清楚了。zeus init
在您的项目中运行。这将创建 2 个文件,应在您的存储库 zeus.json
&中忽略该文件custom_plan.rb
。
添加"thor": ["t"]
到 中的development_environment
部分zeus.json
。然后将以下方法添加到custom_plan.rb
文件中:
def thor
require 'thor/runner'
$thor_runner = true
Thor::Runner.start
end
现在启动 zeuszeus start
并在另一个终端类型zeus t -T
中查看 thor 命令列表。