update
This commit is contained in:
30
phoenix/deps/ecto/lib/mix/tasks/ecto.ex
Normal file
30
phoenix/deps/ecto/lib/mix/tasks/ecto.ex
Normal file
@@ -0,0 +1,30 @@
|
||||
defmodule Mix.Tasks.Ecto do
|
||||
use Mix.Task
|
||||
|
||||
@shortdoc "Prints Ecto help information"
|
||||
|
||||
@moduledoc """
|
||||
Prints Ecto tasks and their information.
|
||||
|
||||
$ mix ecto
|
||||
|
||||
"""
|
||||
|
||||
@impl true
|
||||
def run(args) do
|
||||
{_opts, args} = OptionParser.parse!(args, strict: [])
|
||||
|
||||
case args do
|
||||
[] -> general()
|
||||
_ -> Mix.raise "Invalid arguments, expected: mix ecto"
|
||||
end
|
||||
end
|
||||
|
||||
defp general() do
|
||||
Application.ensure_all_started(:ecto)
|
||||
Mix.shell().info "Ecto v#{Application.spec(:ecto, :vsn)}"
|
||||
Mix.shell().info "A toolkit for data mapping and language integrated query for Elixir."
|
||||
Mix.shell().info "\nAvailable tasks:\n"
|
||||
Mix.Tasks.Help.run(["--search", "ecto."])
|
||||
end
|
||||
end
|
||||
Reference in New Issue
Block a user