-
-
Notifications
You must be signed in to change notification settings - Fork 308
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
Generate a mixin with code generator #51
Conversation
Codecov Report
@@ Coverage Diff @@
## master #51 +/- ##
==========================================
+ Coverage 96.14% 96.55% +0.41%
==========================================
Files 22 29 +7
Lines 726 784 +58
==========================================
+ Hits 698 757 +59
+ Misses 28 27 -1
Continue to review full report at Codecov.
|
mobx_codegen/build.yaml
Outdated
@@ -6,10 +6,10 @@ targets: | |||
|
|||
builders: | |||
todo_reporter: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this should be renamed to mobx_generator
or something like that?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
definitely not a todo_reporter ;-)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yep
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
renamed
|
||
@override | ||
void updateNames({String firstName, String lastName}) { | ||
final _\$prevDerivation = _\$UserActionController.startAction(); | ||
final _\$prevDerivation = _\$UserBaseActionController.startAction(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a great way to add the convenience of calling the method as is!! 🏆, now that we surround with {start,end}Action()
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, wrapping the method with Action would have been a pain or even impossible if we wanted to support generics, positional and named arguments.
Moved templates into their own files.
Changed the code generator to generate a mixin, this allows user defined constructors and inheritance of stores.