From 371672d17cc8a9a6ff6a538fafd28a27d0b2b3d9 Mon Sep 17 00:00:00 2001 From: Zura Gabievi Date: Wed, 14 Dec 2016 14:40:16 +0400 Subject: [PATCH] required to import sass-config --- bower.json | 2 +- package.json | 2 +- src/_config.scss | 6 ++++- test/test.css | 63 +++++++++++++++++++++++++++++++++++------------- 4 files changed, 53 insertions(+), 20 deletions(-) diff --git a/bower.json b/bower.json index 8adfd7a..fc7be43 100644 --- a/bower.json +++ b/bower.json @@ -1,6 +1,6 @@ { "name": "sass-bem", - "version": "2.6.2", + "version": "2.6.3", "main": "_bem.scss", "description": "Amazing package for sass to write bem classes, with namespaces and more advanced features.", "authors": [ diff --git a/package.json b/package.json index ce17686..08ce71d 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "sass-bem", - "version": "2.6.2", + "version": "2.6.3", "description": "Amazing package for sass to write bem classes, with namespaces and more advanced features.", "main": "_bem.scss", "repository": { diff --git a/src/_config.scss b/src/_config.scss index 28d10d6..e229418 100644 --- a/src/_config.scss +++ b/src/_config.scss @@ -1,6 +1,6 @@ @charset "UTF-8"; -@import "../node_modules/sass-config/config"; +//@import "../node_modules/sass-config/config"; /// Default sass-bem configuration settings. /// @@ -32,6 +32,10 @@ /// /// @access public +@if not function-exists(config) { + @error 'sass-config package need to be imported before sass-bem package'; +} + $bem: ( 'debug': false, 'separator': ( diff --git a/test/test.css b/test/test.css index cadb5fd..290af13 100644 --- a/test/test.css +++ b/test/test.css @@ -1,22 +1,51 @@ /* -Error: File to import not found or unreadable: true. - on line 2 of test.scss - -1: @import "../bem"; -2: @import "true"; -3: -4: $true-terminal-output: true; -5: -6: @import "functions"; -7: @import "helpers"; +Error: sass-config package need to be imported before sass-bem package + on line 36 of ../src/_config.scss + from line 9 of ../_bem.scss + from line 1 of test.scss Backtrace: -test.scss:2 -/Users/zgabievi/.rvm/gems/ruby-2.3.0/gems/sass-3.4.22/lib/sass/tree/import_node.rb:67:in `rescue in import' -/Users/zgabievi/.rvm/gems/ruby-2.3.0/gems/sass-3.4.22/lib/sass/tree/import_node.rb:45:in `import' -/Users/zgabievi/.rvm/gems/ruby-2.3.0/gems/sass-3.4.22/lib/sass/tree/import_node.rb:28:in `imported_file' -/Users/zgabievi/.rvm/gems/ruby-2.3.0/gems/sass-3.4.22/lib/sass/tree/import_node.rb:37:in `css_import?' -/Users/zgabievi/.rvm/gems/ruby-2.3.0/gems/sass-3.4.22/lib/sass/tree/visitors/perform.rb:313:in `visit_import' +../src/_config.scss:36 +../_bem.scss:9 +test.scss:1 +/Users/zgabievi/.rvm/gems/ruby-2.3.0/gems/sass-3.4.22/lib/sass/tree/visitors/perform.rb:226:in `visit_error' +/Users/zgabievi/.rvm/gems/ruby-2.3.0/gems/sass-3.4.22/lib/sass/tree/visitors/base.rb:36:in `visit' +/Users/zgabievi/.rvm/gems/ruby-2.3.0/gems/sass-3.4.22/lib/sass/tree/visitors/perform.rb:160:in `block in visit' +/Users/zgabievi/.rvm/gems/ruby-2.3.0/gems/sass-3.4.22/lib/sass/stack.rb:79:in `block in with_base' +/Users/zgabievi/.rvm/gems/ruby-2.3.0/gems/sass-3.4.22/lib/sass/stack.rb:115:in `with_frame' +/Users/zgabievi/.rvm/gems/ruby-2.3.0/gems/sass-3.4.22/lib/sass/stack.rb:79:in `with_base' +/Users/zgabievi/.rvm/gems/ruby-2.3.0/gems/sass-3.4.22/lib/sass/tree/visitors/perform.rb:160:in `visit' +/Users/zgabievi/.rvm/gems/ruby-2.3.0/gems/sass-3.4.22/lib/sass/tree/visitors/perform.rb:301:in `block (2 levels) in visit_if' +/Users/zgabievi/.rvm/gems/ruby-2.3.0/gems/sass-3.4.22/lib/sass/tree/visitors/perform.rb:301:in `map' +/Users/zgabievi/.rvm/gems/ruby-2.3.0/gems/sass-3.4.22/lib/sass/tree/visitors/perform.rb:301:in `block in visit_if' +/Users/zgabievi/.rvm/gems/ruby-2.3.0/gems/sass-3.4.22/lib/sass/tree/visitors/perform.rb:181:in `with_environment' +/Users/zgabievi/.rvm/gems/ruby-2.3.0/gems/sass-3.4.22/lib/sass/tree/visitors/perform.rb:300:in `visit_if' +/Users/zgabievi/.rvm/gems/ruby-2.3.0/gems/sass-3.4.22/lib/sass/tree/visitors/base.rb:36:in `visit' +/Users/zgabievi/.rvm/gems/ruby-2.3.0/gems/sass-3.4.22/lib/sass/tree/visitors/perform.rb:160:in `block in visit' +/Users/zgabievi/.rvm/gems/ruby-2.3.0/gems/sass-3.4.22/lib/sass/stack.rb:79:in `block in with_base' +/Users/zgabievi/.rvm/gems/ruby-2.3.0/gems/sass-3.4.22/lib/sass/stack.rb:115:in `with_frame' +/Users/zgabievi/.rvm/gems/ruby-2.3.0/gems/sass-3.4.22/lib/sass/stack.rb:79:in `with_base' +/Users/zgabievi/.rvm/gems/ruby-2.3.0/gems/sass-3.4.22/lib/sass/tree/visitors/perform.rb:160:in `visit' +/Users/zgabievi/.rvm/gems/ruby-2.3.0/gems/sass-3.4.22/lib/sass/tree/visitors/perform.rb:328:in `block (2 levels) in visit_import' +/Users/zgabievi/.rvm/gems/ruby-2.3.0/gems/sass-3.4.22/lib/sass/tree/visitors/perform.rb:328:in `map' +/Users/zgabievi/.rvm/gems/ruby-2.3.0/gems/sass-3.4.22/lib/sass/tree/visitors/perform.rb:328:in `block in visit_import' +/Users/zgabievi/.rvm/gems/ruby-2.3.0/gems/sass-3.4.22/lib/sass/stack.rb:88:in `block in with_import' +/Users/zgabievi/.rvm/gems/ruby-2.3.0/gems/sass-3.4.22/lib/sass/stack.rb:115:in `with_frame' +/Users/zgabievi/.rvm/gems/ruby-2.3.0/gems/sass-3.4.22/lib/sass/stack.rb:88:in `with_import' +/Users/zgabievi/.rvm/gems/ruby-2.3.0/gems/sass-3.4.22/lib/sass/tree/visitors/perform.rb:325:in `visit_import' +/Users/zgabievi/.rvm/gems/ruby-2.3.0/gems/sass-3.4.22/lib/sass/tree/visitors/base.rb:36:in `visit' +/Users/zgabievi/.rvm/gems/ruby-2.3.0/gems/sass-3.4.22/lib/sass/tree/visitors/perform.rb:160:in `block in visit' +/Users/zgabievi/.rvm/gems/ruby-2.3.0/gems/sass-3.4.22/lib/sass/stack.rb:79:in `block in with_base' +/Users/zgabievi/.rvm/gems/ruby-2.3.0/gems/sass-3.4.22/lib/sass/stack.rb:115:in `with_frame' +/Users/zgabievi/.rvm/gems/ruby-2.3.0/gems/sass-3.4.22/lib/sass/stack.rb:79:in `with_base' +/Users/zgabievi/.rvm/gems/ruby-2.3.0/gems/sass-3.4.22/lib/sass/tree/visitors/perform.rb:160:in `visit' +/Users/zgabievi/.rvm/gems/ruby-2.3.0/gems/sass-3.4.22/lib/sass/tree/visitors/perform.rb:328:in `block (2 levels) in visit_import' +/Users/zgabievi/.rvm/gems/ruby-2.3.0/gems/sass-3.4.22/lib/sass/tree/visitors/perform.rb:328:in `map' +/Users/zgabievi/.rvm/gems/ruby-2.3.0/gems/sass-3.4.22/lib/sass/tree/visitors/perform.rb:328:in `block in visit_import' +/Users/zgabievi/.rvm/gems/ruby-2.3.0/gems/sass-3.4.22/lib/sass/stack.rb:88:in `block in with_import' +/Users/zgabievi/.rvm/gems/ruby-2.3.0/gems/sass-3.4.22/lib/sass/stack.rb:115:in `with_frame' +/Users/zgabievi/.rvm/gems/ruby-2.3.0/gems/sass-3.4.22/lib/sass/stack.rb:88:in `with_import' +/Users/zgabievi/.rvm/gems/ruby-2.3.0/gems/sass-3.4.22/lib/sass/tree/visitors/perform.rb:325:in `visit_import' /Users/zgabievi/.rvm/gems/ruby-2.3.0/gems/sass-3.4.22/lib/sass/tree/visitors/base.rb:36:in `visit' /Users/zgabievi/.rvm/gems/ruby-2.3.0/gems/sass-3.4.22/lib/sass/tree/visitors/perform.rb:160:in `block in visit' /Users/zgabievi/.rvm/gems/ruby-2.3.0/gems/sass-3.4.22/lib/sass/stack.rb:79:in `block in with_base' @@ -56,4 +85,4 @@ test.scss:2 body:before { white-space: pre; font-family: monospace; - content: "Error: File to import not found or unreadable: true.\A on line 2 of test.scss\A \A 1: @import \"../bem\";\A 2: @import \"true\";\A 3: \A 4: $true-terminal-output: true;\A 5: \A 6: @import \"functions\";\A 7: @import \"helpers\";"; } + content: "Error: sass-config package need to be imported before sass-bem package\A on line 36 of ../src/_config.scss\A from line 9 of ../_bem.scss\A from line 1 of test.scss"; }