Sha256: 52730616eafc03801b0c18c307a114299349edbab1b43777be666ac4e5622f11
Contents?: true
Size: 708 Bytes
Versions: 7
Compression:
Stored size: 708 Bytes
Contents
module ScssBoilerplate module Generators class NamespaceGenerator < ::Rails::Generators::Base source_root File.expand_path('../templates', __FILE__) argument :namespace, :type => :string, :default => "application" def generate_namespace # create namespace template "namespace.css.scss", "app/assets/stylesheets/#{namespace}.css.scss" directory "namespace", "app/assets/stylesheets/#{namespace}" # add import to manifest manifest = "app/assets/stylesheets/application.css.scss" create_file manifest unless File.exists? manifest append_to_file manifest, "\n@import \"#{namespace}.css.scss\";" end end end end
Version data entries
7 entries across 7 versions & 1 rubygems