I think that we do emphasize igniter pretty well in the book, using it to install the various components we might need etc. i.e mix igniter.install ash_authentication
, mix igniter.install ash_authentication_phoenix
and mix ash_authentication.add_strategy
.
Igniter & Ash are intended to bring us to a different point than the concept of your standard boilerplate, where you don’t have to opt into the kitchen sink of someone else’s application, you can just install the things you need when you need them.
So if I started out with an application with some example resources:
mix igniter.new my_app --with phx.new --install ash --example
Now if you want authentication in your app, you just say
mix igniter.install ash_authentication_phoenix --auth-strategy magic_link
(these examples are real, you can run them)
And if you realized that you wanted password authentication too, you don’t have to go back to a boilerplate and copy/paste or something, you just mix ash_authentication.add_strategy password
.
Honestly there is still a lot more work to do on this front, but I think we’re moving in the right direction.
Some major pieces left:
-
I’d like to do is to make the
--example
flag do things in other extensions as well. Currently onlyash
reacts to it to create some example resources. -
Another thing is to make the
mix ash.extend
command do more than it currently does, for example:mix ash.extend MyApp.Helpdesk.Ticket graphql
will add theAshGraphql
extension to a resource, but does not configure any mutations and queries etc. -
mix ash.gen.resource MyApp.MyResource
should merge things into the resource in question instead of just ignoring if the resource already exists.