elixir - 'Task could not be found' for custom mix task -


i have task thing in lib/mix/tasks/thing.exs

the code is:

defmodule mix.tasks.thing   use mix.task    def run(_)     io.puts "hello world"   end  end 

when run mix thing or mix thing the task thing not found or the task thing not found

i've tried running mix compile beforehand, didn't help.

i tried putting code this question directly mix.exs, shown in question. still couldn't run task.

mix tasks need compiled. if rename lib/mix/tasks/thing.exs lib/mix/tasks/thing.ex should work.

you can read more scripted mode (.exs) at: http://elixir-lang.org/getting-started/modules.html#scripted-mode


Comments

Popular posts from this blog

mysql - FireDac error 314 - but DLLs are in program directory -

git - How to list all releases of public repository with GitHub API V3 -

c++ - Getting C2512 "no default constructor" for `ClassA` error on the first parentheses of constructor for `ClassB`? -