Sha256: cfb6d2579780bb52ba89814a0a49c7e7fe3db86e271937a9a377ad6e78efafc6

Contents?: true

Size: 899 Bytes

Versions: 16

Compression:

Stored size: 899 Bytes

Contents

require "rails/generators"

module Suspenders
  class StylesheetBaseGenerator < Rails::Generators::Base
    source_root File.expand_path(
      File.join("..", "..", "..", "templates"),
      File.dirname(__FILE__))

    def add_stylesheet_gems
      gem "bourbon", "~> 5.0.0.beta.7"
      gem "neat", "~> 2.0.0.beta.1"
      gem "refills", group: [:development, :test]
      Bundler.with_clean_env { run "bundle install" }
    end

    def add_css_config
      copy_file(
        "application.scss",
        "app/assets/stylesheets/application.scss",
        force: true,
      )
    end

    def remove_prior_config
      remove_file "app/assets/stylesheets/application.css"
    end

    def install_refills
      generate "refills:import", "flashes"
      remove_dir "app/views/refills"
    end

    def install_bitters
      run "bitters install --path app/assets/stylesheets"
    end
  end
end

Version data entries

16 entries across 16 versions & 2 rubygems

Version Path
voyage-1.44.0.14 lib/suspenders/generators/stylesheet_base_generator.rb
voyage-1.44.0.13 lib/suspenders/generators/stylesheet_base_generator.rb
voyage-1.44.0.11 lib/suspenders/generators/stylesheet_base_generator.rb
voyage-1.44.0.12 lib/suspenders/generators/stylesheet_base_generator.rb
voyage-1.44.0.10 lib/suspenders/generators/stylesheet_base_generator.rb
voyage-1.44.0.9 lib/suspenders/generators/stylesheet_base_generator.rb
voyage-1.44.0.8 lib/suspenders/generators/stylesheet_base_generator.rb
voyage-1.44.0.7 lib/suspenders/generators/stylesheet_base_generator.rb
voyage-1.44.0.6 lib/suspenders/generators/stylesheet_base_generator.rb
voyage-1.44.0.5 lib/suspenders/generators/stylesheet_base_generator.rb
voyage-1.44.0.4 lib/suspenders/generators/stylesheet_base_generator.rb
voyage-1.44.0.3 lib/suspenders/generators/stylesheet_base_generator.rb
voyage-1.44.0.2 lib/suspenders/generators/stylesheet_base_generator.rb
voyage-1.44.0.1 lib/suspenders/generators/stylesheet_base_generator.rb
suspenders-1.44.0 lib/suspenders/generators/stylesheet_base_generator.rb
suspenders-1.43.0 lib/suspenders/generators/stylesheet_base_generator.rb