Skip to content

Add support for passing a custom importmap to the tag helper #187

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

Merged
merged 3 commits into from
Jun 18, 2023

Conversation

elia
Copy link
Contributor

@elia elia commented Jun 14, 2023

This is a great feature whenever you have separate areas of the application with completely different sets of dependencies.

The most common example of that is admin areas, both on the main Rails application or coming from engines.

SpinaCMS for example had to add a custom helper https://github.com/SpinaCMS/Spina/blob/400821ddd27aad76c0ff29ac603fb934b5d7e648/app/helpers/spina/spina_helper.rb

@elia elia marked this pull request as draft June 14, 2023 12:00
This is a great feature whenever you have separate areas of the
application with completely different sets of dependencies.

The most common example of that is admin areas, both on the main
Rails application or coming from engines.
@elia elia force-pushed the elia/custom-importmap branch 3 times, most recently from 978e2ff to 311d7eb Compare June 14, 2023 14:05
@elia elia force-pushed the elia/custom-importmap branch from f0328d9 to 997f30b Compare June 14, 2023 14:26
@elia
Copy link
Contributor Author

elia commented Jun 14, 2023

For some reason calling JSPM via Net::HTTP returns a 503, wasn't able to reproduce it locally but I confirmed that curl is not affected. Could be CloudFlare, certs, or anything else.

@elia elia marked this pull request as ready for review June 14, 2023 14:29
elia added a commit to solidusio/solidus that referenced this pull request Jun 14, 2023
- The helper is identical to the original one except for defaults and
  passing a custom importmap (see rails/importmap-rails#187)
- The reloading configuration is a simplified version of the one in
  importmap-rails, same for the reloader
elia added a commit to solidusio/solidus that referenced this pull request Jun 15, 2023
- The helper is identical to the original one except for defaults and
  passing a custom importmap (see rails/importmap-rails#187)
- The reloading configuration is a simplified version of the one in
  importmap-rails, same for the reloader
elia added a commit to solidusio/solidus that referenced this pull request Jun 15, 2023
- The helper is identical to the original one except for defaults and
  passing a custom importmap (see rails/importmap-rails#187)
- The reloading configuration is a simplified version of the one in
  importmap-rails, same for the reloader
@@ -110,6 +110,8 @@ def remove_package_from_importmap(package)
end

def download_package_file(package, url)
return `curl -s '#{url}' > #{vendored_package_path(package)}` if url =~ /jspm.io/
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Need to treat this as a separate change.

Remove unrelated change
@dhh dhh merged commit e8682d5 into rails:main Jun 18, 2023
@elia elia deleted the elia/custom-importmap branch June 19, 2023 08:01
elia added a commit to solidusio/solidus that referenced this pull request Jun 19, 2023
- The helper is identical to the original one except for defaults and
  passing a custom importmap (see rails/importmap-rails#187)
- The reloading configuration is a simplified version of the one in
  importmap-rails, same for the reloader
elia added a commit to solidusio/solidus that referenced this pull request Jul 11, 2023
- The helper is identical to the original one except for defaults and
  passing a custom importmap (see rails/importmap-rails#187)
- The reloading configuration is a simplified version of the one in
  importmap-rails, same for the reloader
elia added a commit to solidusio/solidus that referenced this pull request Aug 2, 2023
- The helper is identical to the original one except for defaults and
  passing a custom importmap (see rails/importmap-rails#187)
- The reloading configuration is a simplified version of the one in
  importmap-rails, same for the reloader
waiting-for-dev pushed a commit to solidusio/solidus that referenced this pull request Aug 8, 2023
- The helper is identical to the original one except for defaults and
  passing a custom importmap (see rails/importmap-rails#187)
- The reloading configuration is a simplified version of the one in
  importmap-rails, same for the reloader
waiting-for-dev pushed a commit to solidusio/solidus that referenced this pull request Aug 9, 2023
- The helper is identical to the original one except for defaults and
  passing a custom importmap (see rails/importmap-rails#187)
- The reloading configuration is a simplified version of the one in
  importmap-rails, same for the reloader
elia added a commit to solidusio/solidus that referenced this pull request Sep 25, 2023
- The helper is identical to the original one except for defaults and
  passing a custom importmap (see rails/importmap-rails#187)
- The reloading configuration is a simplified version of the one in
  importmap-rails, same for the reloader
elia added a commit to solidusio/solidus that referenced this pull request Sep 27, 2023
- The helper is identical to the original one except for defaults and
  passing a custom importmap (see rails/importmap-rails#187)
- The reloading configuration is a simplified version of the one in
  importmap-rails, same for the reloader
elia added a commit to solidusio/solidus that referenced this pull request Sep 28, 2023
- The helper is identical to the original one except for defaults and
  passing a custom importmap (see rails/importmap-rails#187)
- The reloading configuration is a simplified version of the one in
  importmap-rails, same for the reloader
elia added a commit to solidusio/solidus that referenced this pull request Sep 28, 2023
- The helper is identical to the original one except for defaults and
  passing a custom importmap (see rails/importmap-rails#187)
- The reloading configuration is a simplified version of the one in
  importmap-rails, same for the reloader
elia added a commit to solidusio/solidus that referenced this pull request Sep 29, 2023
- The helper is identical to the original one except for defaults and
  passing a custom importmap (see rails/importmap-rails#187)
- The reloading configuration is a simplified version of the one in
  importmap-rails, same for the reloader
elia added a commit to solidusio/solidus that referenced this pull request Oct 6, 2023
- The helper is identical to the original one except for defaults and
  passing a custom importmap (see rails/importmap-rails#187)
- The reloading configuration is a simplified version of the one in
  importmap-rails, same for the reloader
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants