Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/twbs/bootstrap-sass.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGleb Mazovetskiy <glex.spb@gmail.com>2018-12-14 14:30:59 +0300
committerGleb Mazovetskiy <glex.spb@gmail.com>2018-12-14 15:16:04 +0300
commit3c126b3d9616bc07b6d976f8aee7ad662bd8013a (patch)
treef4fed127d124ff0c772344a06868520a44f78954
parentdcdef9bfd81a9821d775417dbdab4c5df3553ba2 (diff)
Revert relative imports change
-rw-r--r--assets/stylesheets/bootstrap/_theme.scss4
-rw-r--r--tasks/converter/less_conversion.rb2
-rw-r--r--test/compilation_test.rb34
-rw-r--r--test/dummy_sass_only/Gemfile2
-rw-r--r--test/dummy_sass_only/compile.rb2
-rw-r--r--test/sass_test.rb1
6 files changed, 28 insertions, 17 deletions
diff --git a/assets/stylesheets/bootstrap/_theme.scss b/assets/stylesheets/bootstrap/_theme.scss
index 468357d9..0ce703ac 100644
--- a/assets/stylesheets/bootstrap/_theme.scss
+++ b/assets/stylesheets/bootstrap/_theme.scss
@@ -8,8 +8,8 @@
// Load core variables and mixins
// --------------------------------------------------
-@import "bootstrap/variables";
-@import "bootstrap/mixins";
+@import "variables";
+@import "mixins";
//
diff --git a/tasks/converter/less_conversion.rb b/tasks/converter/less_conversion.rb
index 3e29cc87..c6cd7e03 100644
--- a/tasks/converter/less_conversion.rb
+++ b/tasks/converter/less_conversion.rb
@@ -124,8 +124,6 @@ class Converter
file = replace_all file, /(\s*)\.navbar-(right|left)\s*\{\s*@extend\s*\.pull-(right|left);\s*/, "\\1.navbar-\\2 {\\1 float: \\2 !important;\\1"
when 'tables.less'
file = replace_all file, /(@include\s*table-row-variant\()(\w+)/, "\\1'\\2'"
- when 'theme.less'
- file = replace_all file, /@import "/, '\0bootstrap/'
when 'thumbnails.less', 'labels.less', 'badges.less', 'buttons.less'
file = extract_nested_rule file, 'a&'
when 'glyphicons.less'
diff --git a/test/compilation_test.rb b/test/compilation_test.rb
index c44a97ac..7e8be285 100644
--- a/test/compilation_test.rb
+++ b/test/compilation_test.rb
@@ -3,16 +3,28 @@ require 'fileutils'
require 'sassc'
class CompilationTest < Minitest::Test
- def test_compilation
- path = 'assets/stylesheets'
- %w(_bootstrap bootstrap/_theme).each do |file|
- FileUtils.rm_rf('.sass-cache', secure: true)
- engine = SassC::Engine.new(File.read("#{path}/#{file}.scss"), syntax: :scss, load_paths: [path])
- FileUtils.mkdir_p("tmp/#{File.dirname(file)}")
- File.open("tmp/#{file}.css", 'w') { |f|
- f.write engine.render
- }
- assert true # nothing was raised
- end
+ def test_compilation_bootstrap
+ compile 'bootstrap'
+ assert true # nothing was raised
+ end
+
+ def test_compilation_bootstrap_theme
+ compile 'bootstrap/theme'
+ assert true # nothing was raised
+ end
+
+ private
+
+ def compile(file)
+ path = File.expand_path('../assets/stylesheets', __dir__)
+ FileUtils.rm_rf('.sass-cache', secure: true)
+ engine = SassC::Engine.new(
+ %Q{@import "#{path}/#{file}"},
+ syntax: :scss, load_paths: ['.']
+ )
+ FileUtils.mkdir_p("tmp/#{File.dirname(file)}")
+ File.open("tmp/#{file}.css", 'w') { |f|
+ f.write engine.render
+ }
end
end
diff --git a/test/dummy_sass_only/Gemfile b/test/dummy_sass_only/Gemfile
index 784b2761..a74bb8f9 100644
--- a/test/dummy_sass_only/Gemfile
+++ b/test/dummy_sass_only/Gemfile
@@ -1,4 +1,4 @@
source 'https://rubygems.org'
-gem 'sassc', '>= 1.12.1'
+gem 'sassc', '>= 2.0.0'
gem 'bootstrap-sass', path: '../..'
diff --git a/test/dummy_sass_only/compile.rb b/test/dummy_sass_only/compile.rb
index 6253af11..50bf3455 100644
--- a/test/dummy_sass_only/compile.rb
+++ b/test/dummy_sass_only/compile.rb
@@ -9,7 +9,7 @@ out_path = ARGV[1]
output = SassC::Engine.new(
File.read(File.expand_path('./import_all.scss', __dir__)),
- syntax: :scss, load_paths: [load_path]
+ syntax: :scss, load_paths: ['.', load_path]
).render
if out_path
diff --git a/test/sass_test.rb b/test/sass_test.rb
index 0cb43533..155603b0 100644
--- a/test/sass_test.rb
+++ b/test/sass_test.rb
@@ -3,6 +3,7 @@
require 'test_helper'
require 'shellwords'
require 'fileutils'
+require 'bootstrap-sass'
class SassTest < Minitest::Test
DUMMY_PATH = 'test/dummy_sass_only'