Bonsai.css

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

Usage

From within a Lucky application with the bloat gem installed, run:
bloat with https://railsbytes.com/script/VB0s7D

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

rails app:template LOCATION="https://railsbytes.com/script/VB0s7D"
Template Source

Review the code before running this template on your machine.

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

# 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
  // https://stackoverflow.com/questions/39535760/what-does-a-tilde-in-a-css-url-do
  @import 'bonsai.css/dist/bonsai.min.css';
  EOF
end

run("yarn install")
Comments

Sign up or Login to leave a comment.