File tree 4 files changed +19
-5
lines changed
4 files changed +19
-5
lines changed Original file line number Diff line number Diff line change 4
4
# Name/Organization <email address>
5
5
6
6
Google Inc.
7
+ Marks and Spencer Plc. John Harvey
[email protected]
Original file line number Diff line number Diff line change
1
+ ## 1.0.0-beta.6
2
+
3
+ * Add support for importing an ` _index.scss ` or ` _index.sass ` file when
4
+ importing a directory.
5
+
1
6
## 1.0.0-beta.5.3
2
7
3
8
* Support hard tabs in the indented syntax.
Original file line number Diff line number Diff line change @@ -7,13 +7,14 @@ import '../util/path.dart';
7
7
8
8
/// Resolves an imported path using the same logic as the filesystem importer.
9
9
///
10
- /// This tries to fill in extensions and partial prefixes. If no file can be
10
+ /// This tries to fill in extensions and partial prefixes and check if a directory default . If no file can be
11
11
/// found, it returns `null` .
12
12
String resolveImportPath (String path) {
13
13
var extension = p.extension (path);
14
- return extension == '.sass' || extension == '.scss'
15
- ? _tryPath (path)
16
- : _tryPathWithExtensions (path);
14
+ if (extension == '.sass' || extension == '.scss' ) return _tryPath (path);
15
+
16
+ var file = _tryPathWithExtensions (path);
17
+ return file != null ? file : _tryPathAsDirectory (path);
17
18
}
18
19
19
20
/// Like [_tryPath] , but checks both `.sass` and `.scss` extensions.
@@ -30,3 +31,10 @@ String _tryPath(String path) {
30
31
if (fileExists (path)) return path;
31
32
return null ;
32
33
}
34
+
35
+ /// Returns the resolved index file for [path] if [path] is a directory and the
36
+ /// index file exists.
37
+ ///
38
+ /// Otherwise, returns `null` .
39
+ String _tryPathAsDirectory (String path) =>
40
+ dirExists (path) ? _tryPathWithExtensions (p.join (path, 'index' )) : null ;
Original file line number Diff line number Diff line change 1
1
name : sass
2
- version : 1.0.0-beta.5.3
2
+ version : 1.0.0-dev
3
3
description : A Sass implementation in Dart.
4
4
author :
Dart Team <[email protected] >
5
5
homepage : https://github.com/sass/dart-sass
You can’t perform that action at this time.
0 commit comments