component-framework 0.1.0 → 0.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 663c497bb487c2f193700b547df7074d6f588200
4
- data.tar.gz: 2d757bfa0dc65ffa3f1a7c1ce3f9a724441468b4
3
+ metadata.gz: 7e798ed16fdc93012173ce779f4512dd91b0e06b
4
+ data.tar.gz: 1aa9c81956c4cabe5c003599ddd068891d2ecdde
5
5
  SHA512:
6
- metadata.gz: 5454e668f8b6ea498f36e2fcee2521078fa1c7713a6bc63263d04ecf588ca8a0ea4bd83b1dd88b83a6320c36bef67bc3f42f4d8ca55b895e481233df087da18e
7
- data.tar.gz: 40f402f768e8efbfc4f8256c306afbfb5626f276051dac23df3667176a3923fab1944afb5b146dec0e9d4dbe3db0e1aafd7db276a4f63415640694b48541f6f7
6
+ metadata.gz: 78fa8320be44429e99c618ef4c4cbc0bf5a1c926e318b561fcd6966700f34c9f94e6f25031895b16a9c955597a913d0166bd2245d38215b7b9586ef9069e7400
7
+ data.tar.gz: c42c1013a32121a84dc577b9b0a94b22be2ee998b617bb1d8773e3860b0d968a11524e3471e2491eb62bfad66a1b8a270c3112feb6051746b22d28c9bb14ef5c
@@ -96,7 +96,6 @@ module Component
96
96
  application.initializer :setup_component_sass, group: :all, after: :setup_sass do |app|
97
97
 
98
98
  require "component/framework/directive_processor"
99
- require "component/framework/sass_importer"
100
99
 
101
100
  app.config.assets.configure do |sprockets_env|
102
101
  Component::Framework.log("Register assets directive processors")
@@ -106,9 +105,12 @@ module Component
106
105
  sprockets_env.register_preprocessor "application/javascript", Component::Framework::DirectiveProcessor
107
106
  sprockets_env.register_preprocessor "text/css", Component::Framework::DirectiveProcessor
108
107
 
109
- Component::Framework.log("Add .scss `@import all-components` support")
110
- sprockets_env.register_transformer "text/scss", "text/css", Component::Framework::ScssTemplate.new
111
- sprockets_env.register_engine(".scss", Component::Framework::ScssTemplate, { silence_deprecation: true })
108
+ if Component::Framework.sass_present?
109
+ require "component/framework/sass_importer"
110
+ Component::Framework.log("Add .scss `@import all-components` support")
111
+ sprockets_env.register_transformer "text/scss", "text/css", Component::Framework::ScssTemplate.new
112
+ sprockets_env.register_engine(".scss", Component::Framework::ScssTemplate, { silence_deprecation: true })
113
+ end
112
114
  end
113
115
  end
114
116
  end
@@ -155,6 +157,11 @@ module Component
155
157
  end
156
158
 
157
159
 
160
+ def self.sass_present?
161
+ defined?(SassC)
162
+ end
163
+
164
+
158
165
  def self.log(message)
159
166
  message = "[CF init] " + message
160
167
  if Rails.logger
@@ -1,5 +1,5 @@
1
1
  module Component
2
2
  module Framework
3
- VERSION = "0.1.0"
3
+ VERSION = "0.1.1"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: component-framework
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Alexander Yegorov