Skip to content

Commit

Permalink
Use bootstrap 5.3 for newly generated apps
Browse files Browse the repository at this point in the history
  • Loading branch information
jcoyne authored and cbeer committed Feb 20, 2024
1 parent d0505ed commit 0e5b1fa
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion app/assets/stylesheets/blacklight/_mixins.scss
Expand Up @@ -15,7 +15,7 @@
}

// define a visually-hidden class that applies to a given breakpoint and below
// https://getbootstrap.com/docs/5.2/helpers/visually-hidden/
// https://getbootstrap.com/docs/5.3/helpers/visually-hidden/
@if mixin-exists(visually-hidden) {
@each $infix, $breakpoint in $grid-breakpoints {
.visually-hidden-#{$infix} {
Expand Down
4 changes: 2 additions & 2 deletions lib/generators/blacklight/assets/importmap_generator.rb
Expand Up @@ -3,7 +3,7 @@
module Blacklight
module Assets
class ImportmapGenerator < Rails::Generators::Base
class_option :'bootstrap-version', type: :string, default: ENV.fetch('BOOTSTRAP_VERSION', '~> 5.1'), desc: "Set the generated app's bootstrap version"
class_option :'bootstrap-version', type: :string, default: ENV.fetch('BOOTSTRAP_VERSION', '~> 5.3'), desc: "Set the generated app's bootstrap version"

# This could be skipped if you want to use webpacker
def add_javascript_dependencies
Expand All @@ -16,7 +16,7 @@ def import_javascript_assets
<<~CONTENT
pin "@github/auto-complete-element", to: "https://cdn.skypack.dev/@github/auto-complete-element"
pin "@popperjs/core", to: "https://ga.jspm.io/npm:@popperjs/core@2.11.6/dist/umd/popper.min.js"
pin "bootstrap", to: "https://ga.jspm.io/npm:bootstrap@#{(defined?(Bootstrap) && Bootstrap::VERSION) || '5.2.2'}/dist/js/bootstrap.js"
pin "bootstrap", to: "https://ga.jspm.io/npm:bootstrap@#{(defined?(Bootstrap) && Bootstrap::VERSION) || '5.3.2'}/dist/js/bootstrap.js"
CONTENT
end

Expand Down
2 changes: 1 addition & 1 deletion lib/generators/blacklight/assets/sprockets_generator.rb
Expand Up @@ -3,7 +3,7 @@
module Blacklight
module Assets
class SprocketsGenerator < Rails::Generators::Base
class_option :'bootstrap-version', type: :string, default: ENV.fetch('BOOTSTRAP_VERSION', '~> 5.1'), desc: "Set the generated app's bootstrap version"
class_option :'bootstrap-version', type: :string, default: ENV.fetch('BOOTSTRAP_VERSION', '~> 5.3'), desc: "Set the generated app's bootstrap version"

# This could be skipped if you want to use webpacker
def add_javascript_dependencies
Expand Down
2 changes: 1 addition & 1 deletion lib/generators/blacklight/assets_generator.rb
Expand Up @@ -2,7 +2,7 @@

module Blacklight
class AssetsGenerator < Rails::Generators::Base
class_option :'bootstrap-version', type: :string, default: ENV.fetch('BOOTSTRAP_VERSION', '~> 5.1'), desc: "Set the generated app's bootstrap version"
class_option :'bootstrap-version', type: :string, default: ENV.fetch('BOOTSTRAP_VERSION', '~> 5.3'), desc: "Set the generated app's bootstrap version"

def run_asset_pipeline_specific_generator
generated_options = "--bootstrap-version='#{options[:'bootstrap-version']}'" if options[:'bootstrap-version']
Expand Down

0 comments on commit 0e5b1fa

Please sign in to comment.