[英]Elixir custom task does not show up on “mix help”
Is the following code not enough to list a custom task on mix help
?以下代码不足以在mix help
上列出自定义任务吗?
defmodule Mix.Tasks.Start do
use Mix.Task
@shortdoc "Starts [App]"
def run(_) do
IO.puts("Starting [App]...")
end
end
I thought that the decorator @shortdoc was enough to list my custom task on mix help
but I recompile my code and my custom task is not being listed on mix help
.我认为装饰器@shortdoc足以在mix help
上列出我的自定义任务,但我重新编译了我的代码并且我的自定义任务没有在mix help
中列出。
In trying it out myself I had to add both a @moduledoc
and a @shortdoc
.在自己尝试时,我必须同时添加一个@moduledoc
和一个@shortdoc
。 Then I had to run mix compile
to get the task on the list in mix help
.然后我不得不运行mix compile
来获取mix help
列表中的任务。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.