Sha256: f0fc2394b3e71e29315e62bd38ff24ce383c48cf63d53abf02dc6f2e3da8b468
Contents?: true
Size: 1.29 KB
Versions: 2
Compression:
Stored size: 1.29 KB
Contents
module Stationed module Generators module Plugins module Styles def self.prepended(base) base.class_option :styles, type: :boolean, default: true, desc: 'Include Bourbon, Neat, Bitters and Normalize.css' end def finish_template return super unless options[:styles] gem 'bourbon' gem 'neat' gem 'bitters' remove_file 'app/assets/stylesheets/application.css' copy_file 'application.scss', 'app/assets/stylesheets/application.scss' copy_file 'layout.scss', 'app/assets/stylesheets/_layout.scss' copy_file '_input_wrapper_default.scss', 'app/assets/stylesheets/modules/_input_wrapper_default.scss' copy_file '_error_notification.scss', 'app/assets/stylesheets/modules/_error_notification.scss' copy_file 'normalize.css', 'vendor/assets/stylesheets/normalize.css' super end def run_bundle super return unless options[:styles] run 'bitters install' FileUtils.mv 'base', 'app/assets/stylesheets/base' gsub_file 'app/assets/stylesheets/base/_base.scss', %r{// @import}, '@import' end end end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
stationed-0.6.0 | lib/stationed/generators/plugins/styles.rb |
stationed-0.5.0 | lib/stationed/generators/plugins/styles.rb |