-
-
Notifications
You must be signed in to change notification settings - Fork 29
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
add the possibility to set a build_extensions option in the build.yaml #140
Conversation
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.
Thanks, this generally looks ok. What is still missing is some documentation for this. Please add a small doc for this in packages/dart_mappable/doc/configuration.md
under Global Options.
@@ -138,6 +137,7 @@ class MappableBuilder implements Builder { | |||
|
|||
output.write('}'); | |||
|
|||
final outputId = buildStep.allowedOutputs.last; |
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.
Please also adjust the code regarding writeImports
(see line 125 and 153) , since this currently assumes the output is under the same path as the input.
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 attempted to follow your instructions, but please double-check them, as I'm uncertain about what you wanted.
Also, closes #138 |
I corrected the import paths. |
We can now add a
yaml options: build_extensions: 'lib/{{path}}/{{file}}.dart': ['lib/{{path}}/generated/{{file}}.mapper.dart', 'lib/{{path}}/generated/{{file}}.init.dart']
To a build.yaml to specify where to put the built files.
I did not find any mappableContainer in the exemples so I'm not shure that it works perfectly for the mappablecontainer. For the others generation, it works like a charm.