Skip to content

Commit 33af011

Browse files
authored
Install bootstrap-icons along with bootstrap (#76)
1 parent fa6151d commit 33af011

File tree

2 files changed

+9
-2
lines changed

2 files changed

+9
-2
lines changed
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
11
@import 'bootstrap/scss/bootstrap';
2+
@import 'bootstrap-icons/font/bootstrap-icons';

lib/install/bootstrap/install.rb

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,13 @@
1-
say "Install Bootstrap with Popperjs/core"
1+
say "Install Bootstrap with Bootstrap Icons and Popperjs/core"
22
copy_file "#{__dir__}/application.bootstrap.scss",
33
"app/assets/stylesheets/application.bootstrap.scss"
4-
run "yarn add sass bootstrap @popperjs/core"
4+
run "yarn add sass bootstrap bootstrap-icons @popperjs/core"
5+
6+
inject_into_file "config/initializers/assets.rb", after: /.*Rails.application.config.assets.paths.*\n/ do
7+
<<~RUBY
8+
Rails.application.config.assets.paths << Rails.root.join("node_modules/bootstrap-icons/font")
9+
RUBY
10+
end
511

612
if Rails.root.join("app/javascript/application.js").exist?
713
say "Appending Bootstrap JavaScript import to default entry point"

0 commit comments

Comments
 (0)