Skip to content

Commit a64cee4

Browse files
committed
Merge pull request #17 from boffbowsh/resolve-explicit-extensions
Resolve explicit extensions as well as implicit
2 parents b528790 + 87fac7b commit a64cee4

File tree

4 files changed

+6
-2
lines changed

4 files changed

+6
-2
lines changed

lib/sassc/rails/importer.rb

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -116,8 +116,7 @@ def imports(path, parent_path)
116116
end
117117
end
118118

119-
# TODO: Raise an error from SassC here
120-
raise ArgumentError.new("file not found: #{path}")
119+
SassC::Importer::Import.new(path)
121120
end
122121

123122
private

test/dummy/app/assets/stylesheets/imports_test.scss

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
@import "partials/css_sass_import";
22
@import "partials/sass_import";
33
@import "partials/scss_import";
4+
@import "partials/explicit_extension_import.foo";
45
@import "globbed/**/*";
56
@import "subfolder/plain";
67
@import "subfolder/second_level";
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
.partial-foo {
2+
color: green
3+
}

test/sassc_rails_test.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -126,6 +126,7 @@ def test_sass_imports_work_correctly
126126
assert_match /top-level/, css_output
127127
assert_match /partial-sass/, css_output
128128
assert_match /partial-scss/, css_output
129+
assert_match /partial-foo/, css_output
129130
assert_match /sub-folder-relative-sass/, css_output
130131
assert_match /sub-folder-relative-scss/, css_output
131132
assert_match /not-a-partial/, css_output

0 commit comments

Comments
 (0)