-
-
Notifications
You must be signed in to change notification settings - Fork 25
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Proposal: plain mix task generator #138
Comments
🤔 yeah, this makes sense to me. I think what we'd do is (soft) deprecate |
Since it will all be the same task it would be a pretty easy change to make, basically just make the current one call |
What about the inverse? Keep |
🤔 potentially...but to me if this is the "generate a mix task" generator, then it feels weird for igniter to be the default. |
Maybe, but I'd guess that most libraries don't use mix tasks at all, and if they are using Igniter to generate a task, it's probably because they want an Igniter task 🙂 (read: they're only writing a task in order to use Igniter!) Eventually, this could also be an interactive prompt that asks what kind of task you want generated (bare mix, igniter task, igniter upgrade task). In the meantime, IMO, add support for generating bare mix tasks without deprecating/changing anything (so add |
Right, I see your point 👍 I'm down w/ just |
I think rather than So if we added |
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 inMIX_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. Alsomix igniter.gen.mix_task
would provide options that would optionally add a@requirements ["app.config"]
line so thatconfig/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 viamix 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 likemix igniter.gen.igniter_task
)The text was updated successfully, but these errors were encountered: