Sha256: 36a87eb60d28eb9a92c2bf1eb81e3d848d0df8e2436f3014ae1548c8bb436693

Contents?: true

Size: 557 Bytes

Versions: 6

Compression:

Stored size: 557 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_css_config
      copy_file(
        "application.sass",
        "app/assets/stylesheets/application.sass",
        force: true,
      )
    end

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

    def install_normalize_css
      run "bin/yarn add normalize.css"
    end
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
welaika-suspenders-2.29.0 lib/suspenders/generators/stylesheet_base_generator.rb
welaika-suspenders-2.29.0.alpha.3 lib/suspenders/generators/stylesheet_base_generator.rb
welaika-suspenders-2.29.0.alpha.2 lib/suspenders/generators/stylesheet_base_generator.rb
welaika-suspenders-2.29.0.alpha.1 lib/suspenders/generators/stylesheet_base_generator.rb
welaika-suspenders-2.28.0 lib/suspenders/generators/stylesheet_base_generator.rb
welaika-suspenders-2.27.0 lib/suspenders/generators/stylesheet_base_generator.rb