Bulma
Add bulma to rails
Used 95 times
D
Duarte M
Usage
Adds https://github.com/joshuajansen/bulma-rails, and optionally https://github.com/dhmgroup/bulma-extensions-rails. Choose the latter by answering Yes on prompt.
The script will also ask if you would like to delete the application.css file.
The script will also ask if you would like to delete the application.css file.
Run this command in your Rails app directory in the terminal:
rails app:template LOCATION="https://railsbytes.com/script/x7msBo"
Template Source
Review the code before running this template on your machine.
run "yarn add bulma"
run "touch app/assets/stylesheets/application.scss"
if yes?("Do you want bulma-extensions, too?")
gem "bulma-rails"
gem "bulma-extensions-rails"
inject_into_file 'app/assets/stylesheets/application.scss' do <<~EOS
@import "bulma";
@import "bulma-extensions";
EOS
end
else
gem "bulma-rails"
inject_into_file 'app/assets/stylesheets/application.scss' do <<~EOS
@import "bulma";
EOS
end
end
run "bundle install"
run "rm app/assets/stylesheets/application.css" if yes?("Delete CSS file?")