mirror of
https://github.com/ash-project/ash_phoenix.git
synced 2024-09-20 15:22:49 +12:00
01ca583443
Co-Authored By: Zach Daniel
29 lines
660 B
Elixir
29 lines
660 B
Elixir
defmodule Mix.Tasks.AshPhoenix.Gen.Live do
|
|
@moduledoc """
|
|
Generates liveviews for a given domain and resource.
|
|
|
|
The domain and resource must already exist, this task does not define them.
|
|
|
|
#{AshPhoenix.Gen.docs()}
|
|
|
|
For example:
|
|
|
|
```bash
|
|
mix ash_phoenix.gen.live ExistingDomainName ExistingResourceName
|
|
```
|
|
"""
|
|
use Mix.Task
|
|
|
|
@shortdoc "Generates liveviews for a resource"
|
|
def run(argv) do
|
|
Mix.Task.run("compile")
|
|
|
|
if Mix.Project.umbrella?() do
|
|
Mix.raise(
|
|
"mix phx.gen.live must be invoked from within your *_web application root directory"
|
|
)
|
|
end
|
|
|
|
AshPhoenix.Gen.Live.generate_from_cli(argv)
|
|
end
|
|
end
|