-
Notifications
You must be signed in to change notification settings - Fork 99
Closed
Description
It took me 2 days to figure out, how to use this gem with bootstrap icons. Frustrating thing!
I would suggest adding a task to this gem, which helps start with Bootstrap 5 and Bootstrap Icons as quickly as possible.
Steps you need to add bootstrap-icons to a new app, created with rails new sample_app --javascript esbuild --css bootstrap.
# Add Bootstrap icons
say "Add Bootstrap icons"
run yarn add bootstrap-icons
append_file "app/assets/stylesheets/application.bootstrap.scss" do
<<~SCSS
@import 'bootstrap-icons/font/bootstrap-icons';
SCSS
end
inject_into_file "config/initializers/assets.rb", after: /.*Rails.application.config.assets.paths.*\n/ do
Rails.application.config.assets.paths << Rails.root.join("node_modules/bootstrap-icons/font")
endI think I can add the steps on this task, but if we need more, I need some help.
Maybe it's better to add another installer?!
What do you think?
What about documentation?
Many thanks to Junichi Ito on StackOverflow
https://stackoverflow.com/questions/70526113/how-to-use-bootstrap-icons-with-rails-7-0
JunichiIto, wrburgess, mkessler, MrHubble, floydj and 4 moreeduardovilke, aasalazar23, mlpinit and krsyoung
Metadata
Metadata
Assignees
Labels
No labels