mirror of
https://github.com/twbs/bootstrap-sass.git
synced 2022-11-09 12:27:02 -05:00
Revert relative imports change
This commit is contained in:
parent
dcdef9bfd8
commit
3c126b3d96
6 changed files with 28 additions and 17 deletions
|
@ -8,8 +8,8 @@
|
|||
// Load core variables and mixins
|
||||
// --------------------------------------------------
|
||||
|
||||
@import "bootstrap/variables";
|
||||
@import "bootstrap/mixins";
|
||||
@import "variables";
|
||||
@import "mixins";
|
||||
|
||||
|
||||
//
|
||||
|
|
|
@ -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'
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
source 'https://rubygems.org'
|
||||
|
||||
gem 'sassc', '>= 1.12.1'
|
||||
gem 'sassc', '>= 2.0.0'
|
||||
gem 'bootstrap-sass', path: '../..'
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -3,6 +3,7 @@
|
|||
require 'test_helper'
|
||||
require 'shellwords'
|
||||
require 'fileutils'
|
||||
require 'bootstrap-sass'
|
||||
|
||||
class SassTest < Minitest::Test
|
||||
DUMMY_PATH = 'test/dummy_sass_only'
|
||||
|
|
Loading…
Add table
Reference in a new issue