Module: BedrockSass
- Defined in:
- lib/bedrock_sass.rb,
lib/bedrock_sass/engine.rb,
lib/bedrock_sass/version.rb
Defined Under Namespace
Classes: Engine
Constant Summary collapse
- VERSION =
'0.2.2'
Class Method Summary collapse
- .ace_path ⇒ Object
- .assets_path ⇒ Object
- .assets_paths ⇒ Object
- .deprecated_sass? ⇒ Boolean
- .foundation_path ⇒ Object
- .gem_path ⇒ Object
- .javascripts_path ⇒ Object
- .load! ⇒ Object
- .motion_ui_path ⇒ Object
- .rails? ⇒ Boolean
- .sprockets? ⇒ Boolean
- .styles_paths ⇒ Object
- .stylesheets_path ⇒ Object
- .tinymce_path ⇒ Object
- .vendor_path ⇒ Object
- .yoastseo_path ⇒ Object
Class Method Details
.ace_path ⇒ Object
47 48 49 |
# File 'lib/bedrock_sass.rb', line 47 def ace_path @ace_path ||= File.join(vendor_path, 'ace') end |
.assets_path ⇒ Object
27 28 29 |
# File 'lib/bedrock_sass.rb', line 27 def assets_path @assets_path ||= File.join(gem_path, 'assets') end |
.assets_paths ⇒ Object
55 56 57 58 59 60 61 62 63 64 65 |
# 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? ⇒ Boolean
84 85 86 |
# File 'lib/bedrock_sass.rb', line 84 def deprecated_sass? defined?(::Sass) && ::Sass.respond_to?(:load_paths) end |
.foundation_path ⇒ Object
35 36 37 |
# File 'lib/bedrock_sass.rb', line 35 def foundation_path @foundation_path ||= File.join(vendor_path, 'foundation', 'scss') end |
.gem_path ⇒ Object
15 16 17 |
# File 'lib/bedrock_sass.rb', line 15 def gem_path @gem_path ||= File.('..', File.dirname(__FILE__)) end |
.javascripts_path ⇒ Object
23 24 25 |
# File 'lib/bedrock_sass.rb', line 23 def javascripts_path File.join(assets_path, 'bedrock', 'js') end |
.load! ⇒ Object
5 6 7 8 9 10 11 12 13 |
# 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 ⇒ Object
39 40 41 |
# File 'lib/bedrock_sass.rb', line 39 def motion_ui_path @motion_ui_path ||= File.join(vendor_path, 'motion-ui') end |
.rails? ⇒ Boolean
80 81 82 |
# File 'lib/bedrock_sass.rb', line 80 def rails? defined?(::Rails) end |
.sprockets? ⇒ Boolean
76 77 78 |
# File 'lib/bedrock_sass.rb', line 76 def sprockets? defined?(::Sprockets) end |
.styles_paths ⇒ Object
67 68 69 70 71 72 73 74 |
# File 'lib/bedrock_sass.rb', line 67 def styles_paths @styles_paths ||= [ motion_ui_path, yoastseo_path, foundation_path, stylesheets_path ] end |
.stylesheets_path ⇒ Object
19 20 21 |
# File 'lib/bedrock_sass.rb', line 19 def stylesheets_path File.join(assets_path, 'bedrock', 'scss') end |
.tinymce_path ⇒ Object
43 44 45 |
# File 'lib/bedrock_sass.rb', line 43 def tinymce_path @tinymce_path ||= File.join(vendor_path, 'tinymce') end |
.vendor_path ⇒ Object
31 32 33 |
# File 'lib/bedrock_sass.rb', line 31 def vendor_path @vendor_path ||= File.join(assets_path, '_vendor') end |
.yoastseo_path ⇒ Object
51 52 53 |
# File 'lib/bedrock_sass.rb', line 51 def yoastseo_path @yoastseo_path ||= File.join(vendor_path, 'yoastseo', 'css') end |