Skip to content
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

Update for use with propshaft gem. #115

Open
StephenVNelson opened this issue Jun 21, 2024 · 1 comment
Open

Update for use with propshaft gem. #115

StephenVNelson opened this issue Jun 21, 2024 · 1 comment

Comments

@StephenVNelson
Copy link

I am not sure if this is out of scope for this gem, but I had to make a small tweak to use this gem with propshaft. The sprockets shortcuts for URLs to assets no longer work, so I had to update them to a simple url() as described here.

Not sure if anybody else would appreciate this or if this gem is still being maintained but we've really appreciated using it and would be happy to contribute if necessary.

@javierjulio
Copy link
Member

@StephenVNelson you're very welcome. Yes this gem is being maintained. We just aren't using propshaft. We'd welcome a contribution to support it alongside sprockets.

From reviewing the docs it sounds like we'd have to separate the vendor assets, one version for each, or find some other way. Unless I'm missing something from what you shared, the CSS should work with propshaft without any modifications, right? Can you please confirm if you build the assets after updating the following method to do nothing, that it works with propshaft?

def use_asset_url_for_css_images
path = "#{ASSETS_PATH}stylesheets/jsoneditor.scss"
modified_css = File.read(path).gsub(/url\("\.\/img\//, 'asset-url("')
File.open(path, 'w') { |f| f.write(modified_css) }
end

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

No branches or pull requests

2 participants