-
-
Notifications
You must be signed in to change notification settings - Fork 315
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
Allow to add to Alchemy's importmap from Rails application #2884
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
tvdeyen
changed the title
Allow to add to Alchemys importmap from Rails application
Allow to add to Alchemy's importmap from Rails application
May 22, 2024
tvdeyen
added a commit
to AlchemyCMS/alchemy-solidus
that referenced
this pull request
May 22, 2024
We need this PR AlchemyCMS/alchemy_cms#2884 for now to be able to use the `Alchemy.importmap` for the `alchemy-product-select`.
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #2884 +/- ##
==========================================
+ Coverage 95.94% 95.95% +0.01%
==========================================
Files 230 230
Lines 6260 6258 -2
==========================================
- Hits 6006 6005 -1
+ Misses 254 253 -1 ☔ View full report in Codecov by Sentry. |
mamhoff
approved these changes
May 22, 2024
tvdeyen
added a commit
to AlchemyCMS/alchemy-solidus
that referenced
this pull request
May 22, 2024
We need this PR AlchemyCMS/alchemy_cms#2884 for now to be able to use the `Alchemy.importmap` for the `alchemy-product-select`.
Rails applications are technically engines, but not really. For example the `engine_name` is the `config/application.rb` modularized class name. Which makes it not nice for this interface from an app developers perspective. Let's make the interface more explicit by using a options hash with readable keys. Rails.application.config.before_initialize do Alchemy.admin_importmaps.add({ importmap_path: Rails.application.root.join("config/alchemy/importmap.rb"), source_paths: [ Rails.application.root.join("app/javascript/components/product_select.js") ], name: "product_select" }) end
tvdeyen
commented
May 22, 2024
tvdeyen
added a commit
to AlchemyCMS/alchemy-solidus
that referenced
this pull request
May 23, 2024
We need this PR AlchemyCMS/alchemy_cms#2884 for now to be able to use the `Alchemy.importmap` for the `alchemy-product-select`.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What is this pull request for?
Rails applications are technically engines, but not really. For example the
engine_name
is theconfig/application.rb
modularized class name. Which makes it not nice for this interface from an app developers perspective.Let's make the interface more explicit by using a options hash with readable keys.
Example
Notable changes
Previously introduced
Alchemy.engine_importmaps
gets renamed intoAlchemy.admin_importmaps
Checklist