module BedrockSass
Constants
- VERSION
Public Class Methods
ace_path()
click to toggle source
# File lib/bedrock_sass.rb, line 47 def ace_path @ace_path ||= File.join(vendor_path, 'ace') end
assets_path()
click to toggle source
# File lib/bedrock_sass.rb, line 27 def assets_path @assets_path ||= File.join(gem_path, 'assets') end
assets_paths()
click to toggle source
# File lib/bedrock_sass.rb, line 55 def assets_paths @assets_paths ||= [ tinymce_path, ace_path, motion_ui_path, foundation_path, yoastseo_path, stylesheets_path, javascripts_path ] end
deprecated_sass?()
click to toggle source
# File lib/bedrock_sass.rb, line 84 def deprecated_sass? defined?(::Sass) && ::Sass.respond_to?(:load_paths) end
foundation_path()
click to toggle source
# File lib/bedrock_sass.rb, line 35 def foundation_path @foundation_path ||= File.join(vendor_path, 'foundation', 'scss') end
gem_path()
click to toggle source
# File lib/bedrock_sass.rb, line 15 def gem_path @gem_path ||= File.expand_path('..', File.dirname(__FILE__)) end
javascripts_path()
click to toggle source
# File lib/bedrock_sass.rb, line 23 def javascripts_path File.join(assets_path, 'bedrock', 'js') end
load!()
click to toggle source
# File lib/bedrock_sass.rb, line 5 def load! if rails? register_rails_engine elsif sprockets? register_sprockets elsif deprecated_sass? register_deprecated_sass end end
motion_ui_path()
click to toggle source
# File lib/bedrock_sass.rb, line 39 def motion_ui_path @motion_ui_path ||= File.join(vendor_path, 'motion-ui') end
rails?()
click to toggle source
# File lib/bedrock_sass.rb, line 80 def rails? defined?(::Rails) end
sprockets?()
click to toggle source
# File lib/bedrock_sass.rb, line 76 def sprockets? defined?(::Sprockets) end
styles_paths()
click to toggle source
# File lib/bedrock_sass.rb, line 67 def styles_paths @styles_paths ||= [ motion_ui_path, yoastseo_path, foundation_path, stylesheets_path ] end
stylesheets_path()
click to toggle source
# File lib/bedrock_sass.rb, line 19 def stylesheets_path File.join(assets_path, 'bedrock', 'scss') end
tinymce_path()
click to toggle source
# File lib/bedrock_sass.rb, line 43 def tinymce_path @tinymce_path ||= File.join(vendor_path, 'tinymce') end
vendor_path()
click to toggle source
# File lib/bedrock_sass.rb, line 31 def vendor_path @vendor_path ||= File.join(assets_path, '_vendor') end
yoastseo_path()
click to toggle source
# File lib/bedrock_sass.rb, line 51 def yoastseo_path @yoastseo_path ||= File.join(vendor_path, 'yoastseo', 'css') end
Private Class Methods
register_deprecated_sass()
click to toggle source
# File lib/bedrock_sass.rb, line 100 def register_deprecated_sass styles_paths.each do |style_path| ::Sass.load_paths << style_path end end
register_rails_engine()
click to toggle source
# File lib/bedrock_sass.rb, line 90 def register_rails_engine require 'bedrock_sass/engine' end
register_sprockets()
click to toggle source
# File lib/bedrock_sass.rb, line 94 def register_sprockets assets_paths.each do |asset_path| Sprockets.append_path(asset_path) end end