Skip to content

Commit af591a8

Browse files
chore: update deps and docs (#3)
1 parent 0b21653 commit af591a8

File tree

5 files changed

+1206
-585
lines changed

5 files changed

+1206
-585
lines changed

.travis.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ node_js:
33
- "6"
44
- "8"
55
- "10"
6-
- "11"
6+
- "12"
77
script: npm run travis
88

99
after_success:

README.md

+8-1
Original file line numberDiff line numberDiff line change
@@ -28,11 +28,17 @@ Pass arbitrary values between your module files
2828
```css
2929
/* my-component.css */
3030
/* alias paths for other values or composition */
31-
@value colors: "./colors.css";
31+
@value colors: "./colors.css";
3232
/* import multiple from a single file */
3333
@value primary, secondary from colors;
3434
/* make local aliases to imported values */
3535
@value small as bp-small, large as bp-large from "./breakpoints.css";
36+
/* value as selector name */
37+
@value selectorValue: secondary-color;
38+
39+
.selectorValue {
40+
color: secondary;
41+
}
3642

3743
.header {
3844
composes: text-primary from colors;
@@ -74,4 +80,5 @@ ISC
7480
- Josh Johnston
7581

7682
---
83+
7784
Glen Maddern, 2015.

package.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,8 @@
3535
"codecov.io": "^0.1.2",
3636
"coveralls": "^3.0.2",
3737
"eslint": "^5.9.0",
38-
"mocha": "^5.2.0",
39-
"nyc": "^13.1.0"
38+
"mocha": "^6.1.4",
39+
"nyc": "^14.1.0"
4040
},
4141
"dependencies": {
4242
"icss-utils": "^4.0.0",

test/index.js

+15-1
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,21 @@ describe('constants', () => {
5555
);
5656
});
5757

58-
it('should import and re-export a simple constant', () => {
58+
it('should replace selectors within the file #1', () => {
59+
test(
60+
'@value colorValue red; #colorValue { color: colorValue; }',
61+
':export {\n colorValue: red;\n}\n#red { color: red; }'
62+
);
63+
});
64+
65+
it('should replace selectors within the file #2', () => {
66+
test(
67+
'@value colorValue red; .colorValue > .colorValue { color: colorValue; }',
68+
':export {\n colorValue: red;\n}\n.red > .red { color: red; }'
69+
);
70+
});
71+
72+
it.only('should import and re-export a simple constant', () => {
5973
test(
6074
'@value red from "./colors.css";',
6175
':import("./colors.css") {\n i__const_red_0: red\n}\n:export {\n red: i__const_red_0\n}'

0 commit comments

Comments
 (0)