lib/mix/tasks/json.ex
defmodule Mix.Tasks.ExDbmigrate.Gen.Json do
use Mix.Task
@moduledoc """
After configuring your default ecto repo in `:ecto_repos`
Run mix ExDbmigrate to generates a json view.
"""
def run(_args) do
{:ok, _} = Application.ensure_all_started(:ex_dbmigrate)
Mix.shell().info("ExDbmigrate v#{Application.spec(:ex_dbmigrate, :vsn)}")
ExDbmigrate.json()
|> Enum.join(", ")
end
end