A Utility Complete CSS Framework for less than 45kb (8kb Gzipped). Integration for Lucky Framework
Icons/chart bar
Used 17 times
Created by
M Massimiliano Bertinetti


From within a Lucky application with the bloat gem installed, run:
bloat with

Run this command in your Rails app directory in the terminal:

rails app:template LOCATION=""
Template Source

Review the code before running this template on your machine.

def yarn(*packages)
  run("yarn add #{packages.join(" ")}")

# Add StimulusJS to package.json
yarn "bonsai.css"

remove_file "src/css/app.scss"
create_file "src/css/app.scss" do<<~EOF
  // Lucky generates 3 folders to help you organize your CSS:
  //    - src/css/variables # Files for colors, spacing, etc.
  //    - src/css/mixins # Put your mixin functions in files here
  //    - src/css/components # CSS for your components
  // Remember to import your new CSS files or they won't be loaded:
  //    @import "./variables/colors" # Imports the file in src/css/variables/_colors.scss
  // Note: importing with `~` tells webpack to look in the installed npm packages
  @import 'bonsai.css/dist/bonsai.min.css';

run("yarn install")

Sign up or Login to leave a comment.