-
-
Notifications
You must be signed in to change notification settings - Fork 122
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 support for Zeitwerk #180
Add support for Zeitwerk #180
Conversation
@kennyadsl how about moving decorators into their own directory (like we do in
So, basically, the pattern is: This creates a very clean visual separation for developers and also makes sure we don't add decorator files to If you think this structure works, I would suggest adding this to solidus_support instead. A lot of extensions could benefit from this pattern. |
We'd still need to differentiate the type of decorator in an inner folder, so it would be:
So it's a bit more complex, but maybe the best path. |
I think that works, even if it's not exactly beautiful, and it's basically the same structure we have in |
Decorator files are now correctly added to the autoloader and are also loaded on engine boot.
There's no need to keep empty assets in this extension. We were also forcing their compilation into the host application, which is not needed at all.
ea1da4d
to
0aa00ab
Compare
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 @kennyadsl!
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.
just a couple of nits
0aa00ab
to
8b087a7
Compare
Decorator files are now correctly added to the autoloader and are also loaded on engine boot. This extension is quite unique since it conditionally loads frontend and backend so we can't use the Engine helpers recently added in
solidus_support
.This PR is also removing useless assets compilation and refactoring the Engine a little bit.