Sha256: 9b6cde3d97d02d14636d7b4f177039aebfefb25b11b59c016dcf71614816b715

Contents?: true

Size: 473 Bytes

Versions: 11

Compression:

Stored size: 473 Bytes

Contents

require "sassc/engine"
require "rails/generators/named_base"

module Sass
  module Generators
    class ScaffoldBase < ::Rails::Generators::NamedBase
      def copy_stylesheet
        dir = ::Rails::Generators::ScaffoldGenerator.source_root
        file = File.join(dir, "scaffold.css")
        converted_contents = ::SassC::Engine.new(File.read(file)).render
        create_file "app/assets/stylesheets/scaffolds.#{syntax}", converted_contents
      end
    end
  end
end

Version data entries

11 entries across 10 versions & 4 rubygems

Version Path
trusty-cms-7.0.9.1 vendor/bundle/ruby/3.1.0/gems/sassc-rails-2.1.2/lib/rails/generators/sass_scaffold.rb
trusty-cms-7.0.9.1 vendor/bundle/ruby/3.3.0/gems/sassc-rails-2.1.2/lib/rails/generators/sass_scaffold.rb
blacklight-spotlight-3.6.0.beta8 vendor/bundle/ruby/3.2.0/gems/sassc-rails-2.1.2/lib/rails/generators/sass_scaffold.rb
zuora_connect_ui-0.10.0 vendor/ruby/2.6.0/gems/sassc-rails-2.1.2/lib/rails/generators/sass_scaffold.rb
zuora_connect_ui-0.9.2 vendor/ruby/2.6.0/gems/sassc-rails-2.1.2/lib/rails/generators/sass_scaffold.rb
zuora_connect_ui-0.9.1 vendor/ruby/2.6.0/gems/sassc-rails-2.1.2/lib/rails/generators/sass_scaffold.rb
zuora_connect_ui-0.9.0 vendor/ruby/2.6.0/gems/sassc-rails-2.1.2/lib/rails/generators/sass_scaffold.rb
zuora_connect_ui-0.8.3 vendor/ruby/2.6.0/gems/sassc-rails-2.1.2/lib/rails/generators/sass_scaffold.rb
zuora_connect_ui-0.8.2 vendor/ruby/2.6.0/gems/sassc-rails-2.1.2/lib/rails/generators/sass_scaffold.rb
sassc-rails-2.1.2 lib/rails/generators/sass_scaffold.rb
sassc-rails-2.1.1 lib/rails/generators/sass_scaffold.rb