Skip to content

Commit

Permalink
Merge pull request #1 from sqm/1207966452799142-upgrade-to-bootstrap-5
Browse files Browse the repository at this point in the history
Adjust naming to avoid conflict with older version of Bootstrap
  • Loading branch information
nspielman authored Aug 29, 2024
2 parents f1f92e0 + 5dfd004 commit c3bb6b4
Show file tree
Hide file tree
Showing 132 changed files with 93 additions and 93 deletions.
28 changes: 0 additions & 28 deletions assets/javascripts/bootstrap-sprockets.js

This file was deleted.

28 changes: 28 additions & 0 deletions assets/javascripts/bootstrap5-sprockets.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
//= require ./bootstrap5-global-this-define
//= require ./bootstrap5/dom/data
//= require ./bootstrap5/util/index
//= require ./bootstrap5/dom/event-handler
//= require ./bootstrap5/dom/manipulator
//= require ./bootstrap5/util/config
//= require ./bootstrap5/base-component
//= require ./bootstrap5/dom/selector-engine
//= require ./bootstrap5/util/backdrop
//= require ./bootstrap5/util/component-functions
//= require ./bootstrap5/util/focustrap
//= require ./bootstrap5/util/scrollbar
//= require ./bootstrap5/offcanvas
//= require ./bootstrap5/dropdown
//= require ./bootstrap5/util/sanitizer
//= require ./bootstrap5/util/template-factory
//= require ./bootstrap5/tooltip
//= require ./bootstrap5/toast
//= require ./bootstrap5/popover
//= require ./bootstrap5/util/swipe
//= require ./bootstrap5/alert
//= require ./bootstrap5/button
//= require ./bootstrap5/carousel
//= require ./bootstrap5/modal
//= require ./bootstrap5/collapse
//= require ./bootstrap5/scrollspy
//= require ./bootstrap5/tab
//= require ./bootstrap5-global-this-undefine
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
52 changes: 0 additions & 52 deletions assets/stylesheets/_bootstrap.scss

This file was deleted.

File renamed without changes.
File renamed without changes.
52 changes: 52 additions & 0 deletions assets/stylesheets/_bootstrap5.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
@import "bootstrap5/mixins/banner";
@include bsBanner("");


// scss-docs-start import-stack
// Configuration
@import "bootstrap5/functions";
@import "bootstrap5/variables";
@import "bootstrap5/variables-dark";
@import "bootstrap5/maps";
@import "bootstrap5/mixins";
@import "bootstrap5/utilities";

// Layout & components
@import "bootstrap5/root";
@import "bootstrap5/reboot";
@import "bootstrap5/type";
@import "bootstrap5/images";
@import "bootstrap5/containers";
@import "bootstrap5/grid";
@import "bootstrap5/tables";
@import "bootstrap5/forms";
@import "bootstrap5/buttons";
@import "bootstrap5/transitions";
@import "bootstrap5/dropdown";
@import "bootstrap5/button-group";
@import "bootstrap5/nav";
@import "bootstrap5/navbar";
@import "bootstrap5/card";
@import "bootstrap5/accordion";
@import "bootstrap5/breadcrumb";
@import "bootstrap5/pagination";
@import "bootstrap5/badge";
@import "bootstrap5/alert";
@import "bootstrap5/progress";
@import "bootstrap5/list-group";
@import "bootstrap5/close";
@import "bootstrap5/toasts";
@import "bootstrap5/modal";
@import "bootstrap5/tooltip";
@import "bootstrap5/popover";
@import "bootstrap5/carousel";
@import "bootstrap5/spinners";
@import "bootstrap5/offcanvas";
@import "bootstrap5/placeholders";

// Helpers
@import "bootstrap5/helpers";

// Utilities
@import "bootstrap5/utilities/api";
// scss-docs-end import-stack
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
6 changes: 3 additions & 3 deletions bootstrap.gemspec → bootstrap5.gemspec
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
lib = File.expand_path('../lib', __FILE__)
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
require 'bootstrap/version'
require 'bootstrap5/version'

Gem::Specification.new do |s|
s.name = 'bootstrap'
s.version = Bootstrap::VERSION
s.name = 'bootstrap5'
s.version = Bootstrap5::VERSION
s.authors = ['Twitter, Inc.']
s.email = '[email protected]'
s.summary = 'The most popular HTML, CSS, and JavaScript framework for developing responsive, mobile first projects on the web. http://getbootstrap.com'
Expand Down
8 changes: 4 additions & 4 deletions lib/bootstrap.rb → lib/bootstrap5.rb
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
# frozen_string_literal: true

require 'bootstrap/version'
require 'bootstrap5/version'
require 'popper_js'

module Bootstrap
module Bootstrap5
class << self
# Inspired by Kaminari
def load!
Expand Down Expand Up @@ -58,7 +58,7 @@ def hanami?
private

def register_rails_engine
require 'bootstrap/engine'
require 'bootstrap5/engine'
end

def register_sprockets
Expand All @@ -72,4 +72,4 @@ def register_hanami
end
end

Bootstrap.load!
Bootstrap5.load!
4 changes: 2 additions & 2 deletions lib/bootstrap/engine.rb → lib/bootstrap5/engine.rb
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,10 @@
end
end

module Bootstrap
module Bootstrap5
module Rails
class Engine < ::Rails::Engine
initializer 'bootstrap.assets' do |app|
initializer 'bootstrap5.assets' do |app|
%w(stylesheets javascripts).each do |sub|
app.config.assets.paths << root.join('assets', sub).to_s
end
Expand Down
2 changes: 1 addition & 1 deletion lib/bootstrap/version.rb → lib/bootstrap5/version.rb
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# frozen_string_literal: true

module Bootstrap
module Bootstrap5
VERSION = '5.3.3'
BOOTSTRAP_SHA = '6e1f75f420f68e1d52733b8e407fc7c3766c9dba'
end
2 changes: 1 addition & 1 deletion test/dummy_rails/app/assets/javascripts/application.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
//= require popper.js
//= require bootstrap-sprockets
//= require bootstrap5-sprockets

document.addEventListener('DOMContentLoaded', () => {
for (const tooltipTriggerEl of document.querySelectorAll('[data-bs-toggle="tooltip"]')) {
Expand Down
2 changes: 1 addition & 1 deletion test/dummy_rails/app/assets/stylesheets/application.sass
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
@import 'bootstrap'
@import 'bootstrap5'

.test-mixin
+make-container
2 changes: 1 addition & 1 deletion test/dummy_rails/config/application.rb
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
end

require 'uglifier'
require 'bootstrap'
require 'bootstrap5'

module Dummy
class Application < Rails::Application
Expand Down

0 comments on commit c3bb6b4

Please sign in to comment.