Skip to content

Commit

Permalink
Merge pull request sass#103 from aqeelvn/master
Browse files Browse the repository at this point in the history
Fix the ordering so that more specialised files are correctly picked
  • Loading branch information
bolandrm authored May 8, 2019
2 parents 8ef3664 + 70d4aee commit cd6e779
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 5 deletions.
10 changes: 5 additions & 5 deletions lib/sassc/rails/importer.rb
Original file line number Diff line number Diff line change
Expand Up @@ -75,13 +75,13 @@ def import_for(full_path, parent_dir, options)
EXTENSIONS = [
CssScssExtension.new,
CssSassExtension.new,
Extension.new(".scss"),
Extension.new(".sass"),
CSSExtension.new,
SassERBExtension.new,
ERBExtension.new(".scss.erb"),
ERBExtension.new(".css.erb"),
SassERBExtension.new
]
Extension.new(".scss"),
Extension.new(".sass"),
CSSExtension.new
].freeze

PREFIXS = [ "", "_" ]
GLOB = /(\A|\/)(\*|\*\*\/\*)\z/
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
@import "globbed_multiple_extensions/**/*";
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
.glob {
margin: <%= 0 %>;
}
10 changes: 10 additions & 0 deletions test/sassc_rails_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -271,6 +271,16 @@ def test_allows_for_inclusion_of_inline_source_maps
# assert_match /\.import-css-application/, css_output
#end

def test_globbed_imports_work_with_multiple_extensions
initialize!

asset = render_asset("glob_multiple_extensions_test.css")

assert_equal <<-CSS, asset
.glob{margin:0}
CSS
end

def test_globbed_imports_work_when_globbed_file_is_changed
skip "This seems to work in practice, possible test setup problem"

Expand Down

0 comments on commit cd6e779

Please sign in to comment.