ash-project / ash-project/igniter
Proposal: plain mix task generator
- Dominant language
- Elixir
- Stars
- 404
- Forks
- 75
- Avg merge
- 9h 58m
- Merged PRs (30d)
- 3
Description
**Is your feature request related to a problem? Please describe.**
I occasionally need to generate a new mix task for a end project that I'm working on. When I do so I usually have to lookup the syntax (and path) for generating a mix task.
**Describe the solution you'd like**
A new igniter task like `mix igniter.gen.mix_task` that generates a mix task that is expected to run without igniter (e.g. so it can run even in `MIX_ENV=prod` mode or in a project that won't continue to use Igniter). The generated task will follow best practices/nudges such as providing an explicit example and documenting options. Also `mix igniter.gen.mix_task` would provide options that would optionally add a `@requirements ["app.config"]` line so that `config/runtime.exs` is loaded.
This would also help me not forget to add things like `@shortdoc` which (if I recall correctly) is required for the mix task to be visible via `mix help`.
**Describe alternatives you've considered**
Generating the mix task by hand or modifying the mix task generated by `mix igniter.gen.task`
**Additional context**
Maybe instead of a new igniter task it should be an argument to `mix igniter.gen.task` so that users don't get confused about which type of task to generate (or perhaps the existing task could be renamed to something like `mix igniter.gen.igniter_task`)
Contributor guide
Research direction
Start with the existing `mix igniter.gen.task` entry point and compare the proposed standalone mix-task flow with its behavior. Resolve whether this should be a new `mix igniter.gen.mix_task` command or an option, then ensure the generated task runs without Igniter, documents options, includes an explicit example and `@shortdoc`, and optionally adds `@requirements ["app.config"]`.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- elixir
- Domain
- cli, tooling
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100