Skip to content

Commit 1a8a2d4

Browse files
jonathantnealromainmenke
authored andcommitted
2.0.2
1 parent 1849d2d commit 1a8a2d4

File tree

5 files changed

+23
-3
lines changed

5 files changed

+23
-3
lines changed

plugins/postcss-env-function/.tape.js

+6
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,12 @@ module.exports = {
7777
},
7878
expect: 'basic.import.expect.css',
7979
result: 'basic.import.result.css'
80+
},
81+
'basic:import-is-empty': {
82+
message: 'supports { importFrom: {} } usage',
83+
options: {
84+
importFrom: {}
85+
}
8086
}
8187
}
8288
};

plugins/postcss-env-function/CHANGELOG.md

+4
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
# Changes to PostCSS Environment Variables
22

3+
### 2.0.2 (September 20, 2018)
4+
5+
- Updated: Do not break on an empty importFrom object
6+
37
### 2.0.1 (September 18, 2018)
48

59
- Updated: Support for PostCSS Values Parser 2

plugins/postcss-env-function/lib/import-from.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ export default function importEnvironmentVariablesFromSources(sources) {
5959
const from = String(opts.from || '');
6060

6161
// type of file being read from
62-
const type = (opts.type || path.extname(opts.from).slice(1)).toLowerCase();
62+
const type = (opts.type || path.extname(from).slice(1)).toLowerCase();
6363

6464
return { type, from };
6565
}).reduce(async (environmentVariables, source) => {

plugins/postcss-env-function/package.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "postcss-env-function",
3-
"version": "2.0.1",
3+
"version": "2.0.2",
44
"description": "Use env() variables in CSS",
55
"author": "Jonathan Neal <jonathantneal@hotmail.com>",
66
"license": "CC0-1.0",
@@ -39,7 +39,7 @@
3939
"eslint-config-dev": "^2.0.0",
4040
"postcss-tape": "^2.2.0",
4141
"pre-commit": "^1.2.2",
42-
"rollup": "^0.66.0",
42+
"rollup": "^0.66.1",
4343
"rollup-plugin-babel": "^4.0.3"
4444
},
4545
"eslintConfig": {
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
body {
2+
order: 1;
3+
padding: env(--some-custom-padding);
4+
}
5+
6+
@media (min-width: env(--another-custom-width)) {
7+
body {
8+
order: 2;
9+
}
10+
}

0 commit comments

Comments
 (0)