Skip to content

Commit 95243ca

Browse files
committed
added an explicity import-ordering test & bumped version
1 parent 39a935d commit 95243ca

File tree

5 files changed

+23
-2
lines changed

5 files changed

+23
-2
lines changed

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "postcss-modules-extract-imports",
3-
"version": "0.0.1",
3+
"version": "0.0.2",
44
"description": "A CSS Modules transform to extract local aliases for inline imports",
55
"main": "lib/index.js",
66
"scripts": {
@@ -43,7 +43,7 @@
4343
"chokidar-cli": "^0.2.1",
4444
"codecov.io": "^0.1.2",
4545
"coveralls": "^2.11.2",
46-
"eslint": "^0.21.2",
46+
"eslint": "^0.22.1",
4747
"istanbul": "^0.3.14",
4848
"mocha": "^2.2.5"
4949
}

test/test-cases/import-multiple-references/expected.css

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,9 @@
66
:import("path/library2.css") {
77
importName: __imported_importName_2;
88
}
9+
:import("path/dep3.css") {
10+
thirdDep: __imported_thirdDep_4;
11+
}
912
:local(.exportName) {
1013
extends: __imported_importName_0 __imported_secondImport_1;
1114
extends: __imported_importName_2;
@@ -14,4 +17,5 @@
1417
:local(.exportName2) {
1518
extends: __imported_secondImport_1;
1619
extends: __imported_secondImport_1;
20+
extends: __imported_thirdDep_4;
1721
}

test/test-cases/import-multiple-references/source.css

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,5 @@
66
:local(.exportName2) {
77
extends: secondImport from 'path/library.css';
88
extends: secondImport from 'path/library.css';
9+
extends: thirdDep from 'path/dep3.css';
910
}
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
:import("./b.css") {
2+
b: __imported_b_0;
3+
}
4+
:import("./c.css") {
5+
c: __imported_c_1;
6+
}
7+
.a {
8+
extends: __imported_b_0;
9+
extends: __imported_c_1;
10+
color: #aaa;
11+
}
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
.a {
2+
extends: b from "./b.css";
3+
extends: c from "./c.css";
4+
color: #aaa;
5+
}

0 commit comments

Comments
 (0)