Skip to content
This repository was archived by the owner on Oct 2, 2020. It is now read-only.

Commit 5697b02

Browse files
Support index.less when referencing a directory
Requires a new version of npm-import-plugin-test
1 parent 8f8264d commit 5697b02

File tree

3 files changed

+16
-0
lines changed

3 files changed

+16
-0
lines changed

lib/npm-file-manager.js

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,5 +69,13 @@ module.exports = function(less) {
6969
return FileManager.prototype.loadFileSync.call(this, filename, "", options, environment);
7070
};
7171

72+
NpmFileManager.prototype.tryAppendExtension = function(path, ext) {
73+
return path;
74+
};
75+
76+
NpmFileManager.prototype.tryAppendLessExtension = function(path) {
77+
return path;
78+
};
79+
7280
return NpmFileManager;
7381
};

test/css/npm-import/test.css

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,3 +7,9 @@
77
.test_deeper_file {
88
color: black;
99
}
10+
.test_index {
11+
color: black;
12+
}
13+
.test_deeper_index {
14+
color: black;
15+
}

test/less/npm-import/test.less

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
11
@import "npm://npm-import-plugin-test/file";
22
@import (less) "npm://npm-import-plugin-test/file.css";
33
@import "npm://npm-import-plugin-test/deeper/file";
4+
@import "npm://npm-import-plugin-test";
5+
@import "npm://npm-import-plugin-test/deeper/";

0 commit comments

Comments
 (0)