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

Enable bypassing the assets generator #286

Closed
seanaery opened this issue Nov 21, 2024 · 1 comment · Fixed by #293
Closed

Enable bypassing the assets generator #286

seanaery opened this issue Nov 21, 2024 · 1 comment · Fixed by #293

Comments

@seanaery
Copy link
Collaborator

It'd be really valuable to add a --skip-assets option to the InstallGenerator. This option exists in Blacklight core, and I have found it essential in cases where my application's Javascript approach doesn't quite match the assumptions made by the generator and needs more nuanced/manual setup (e.g., applications that are still using Sprockets for JS).

E.g., currently if running generate 'blacklight_range_limit:install' in a Blacklight 8 application that began with generate 'blacklight:install', '--skip-assets' & generate 'blacklight:assets:sprockets' I get this error, as I have neither importmap-rails nor package.json.

info  =================================
        info  Installing Blacklight Range Limit
        info  =================================
    generate  blacklight_range_limit:install
       rails  generate blacklight_range_limit:install 
    generate  blacklight_range_limit:assets
       rails  generate blacklight_range_limit:assets 
/gems/ruby/3.3.0/gems/blacklight_range_limit-9.0.0.beta1/lib/generators/blacklight_range_limit/assets_generator.rb:37:in `set_default_options': Could not identify asset_delivery_mode, try supplying --asset-delivery-mode=[importmap-rails|yarn-package] (ArgumentError)

          raise ArgumentError.new("Could not identify asset_delivery_mode, try supplying --asset-delivery-mode=[importmap-rails|yarn-package]")
@jrochkind
Copy link
Member

jrochkind commented Nov 21, 2024

Yes, we need this. Also for people installing in situations that work but our installers can't do automatically, like vite_rails.

I'll try to get to it, although suddenly got kind of overwhelmed with tasks today!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants