Closed jwoertink closed 10 months ago
Yeah, it's always been weird to me that those two generators are separate. The landslide majority of the time I'm adding an action, I want a page too.
Is there room for a combo-blaster generator instead of tying these two generators together? lucky gen.actionpage
or something?
Is there room for a combo-blaster generator
I'm open to one. It would need to be named something clear with the understanding that it's a BrowserAction being generated. I don't think you'd generate an ApiAction with a page since you'll usually just return JSON...
The other option suggested was using lucky gen.resource
without the model, migration, operations, queries....
I consider only lucky gen.action.browser Posts::Index --with-page
is enough, inverse no need. it rarely happens there exists page but no action?
I created two bash script for make create CRUD only(no db)
and Action + Page
more easier.
The good part is, no need wait compile, and support create namespaced CRUD. bad part is, the db column never be checked, so, new generated file probably exists error, need adjust.
I do create a https://github.com/luckyframework/avram/pull/935 for refine the CRUD templates make it more consistent.
Ref: https://github.com/luckyframework/lucky/discussions/1794
This would be
lucky gen.action.browser Posts::Index --with-page
which would generateMaybe the
lucky gen.page
task could also have a--with-action
just for the inverse consistency too....