Skip to content

Commit b7a6b9c

Browse files
jonathantnealromainmenke
authored andcommitted
3.0.0
1 parent d22f603 commit b7a6b9c

File tree

7 files changed

+65
-58
lines changed

7 files changed

+65
-58
lines changed
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
* text=auto eol=lf

plugins/postcss-env-function/.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
1+
dist
12
node_modules
2-
index.*.*
33
package-lock.json
44
*.log*
55
*.result.css
66
.*
77
!.editorconfig
8+
!.gitattributes
89
!.gitignore
910
!.rollup.js
1011
!.tape.js
Lines changed: 7 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,9 @@
1-
import babel from 'rollup-plugin-babel';
1+
import pkg from './package.json'
22

33
export default {
4-
input: 'src/index.js',
5-
output: [
6-
{ file: 'index.cjs.js', format: 'cjs', sourcemap: true },
7-
{ file: 'index.esm.mjs', format: 'es', sourcemap: true }
8-
],
9-
plugins: [
10-
babel({
11-
plugins: [
12-
'@babel/plugin-syntax-dynamic-import'
13-
],
14-
presets: [
15-
['@babel/env', { modules: false, targets: { node: 8 } }]
16-
]
17-
})
18-
]
19-
};
4+
...pkg.rollup,
5+
plugins: pkg.rollup.plugins.map(plugin => require(plugin)()),
6+
onwarn(warning, warn) {
7+
if (warning.code !== 'UNRESOLVED_IMPORT') warn(warning)
8+
}
9+
}

plugins/postcss-env-function/.travis.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
language: node_js
44

55
node_js:
6-
- 8
6+
- 10
77

88
install:
99
- npm install --ignore-scripts

plugins/postcss-env-function/CHANGELOG.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,9 @@
22

33
### 3.0.0 (June 13, 2019)
44

5-
- Updated: `postcss-values-parser` to 3.0.4 (major)
6-
- Updated: `postcss` to 7.0.17 (patch)
5+
- Updated: `postcss-values-parser` to 3.2.0 (major)
6+
- Updated: `postcss` to 7.0.27 (patch)
7+
- Updated: Support for Node 10+ (major)
78

89
### 2.0.2 (September 20, 2018)
910

plugins/postcss-env-function/README.md

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
# PostCSS Environment Variables [<img src="https://postcss.github.io/postcss/logo.svg" alt="PostCSS Logo" width="90" height="90" align="right">][postcss]
22

3-
[![NPM Version][npm-img]][npm-url]
4-
[![CSS Standard Status][css-img]][css-url]
5-
[![Build Status][cli-img]][cli-url]
6-
[![Support Chat][git-img]][git-url]
3+
[<img alt="NPM Version" src="https://img.shields.io/npm/v/postcss-env-function.svg" height="20">][npm-url]
4+
[<img alt="CSS Standard Status" src="https://cssdb.org/badge/environment-variables.svg" height="20">][css-url]
5+
[<img alt="Build Status" src="https://img.shields.io/travis/csstools/postcss-env-function/master.svg" height="20">][cli-url]
6+
[<img alt="Support Chat" src="https://img.shields.io/badge/support-chat-blue.svg" height="20">][git-url]
77

88
[PostCSS Environment Variables] lets you use `env()` variables in CSS,
99
following the [CSS Environment Variables] specification.
@@ -123,13 +123,9 @@ postcssCustomProperties({
123123
See example imports written in [JS](test/import-variables.js) and
124124
[JSON](test/import-variables.json). Currently only valid [custom property names] (beginning with `--`) are accepted. Not all valid [declaration value names] are accepted.
125125

126-
[cli-img]: https://img.shields.io/travis/csstools/postcss-env-function/master.svg
127126
[cli-url]: https://travis-ci.org/csstools/postcss-env-function
128-
[css-img]: https://cssdb.org/badge/environment-variables.svg
129127
[css-url]: https://cssdb.org/#environment-variables
130-
[git-img]: https://img.shields.io/badge/support-chat-blue.svg
131128
[git-url]: https://gitter.im/postcss/postcss
132-
[npm-img]: https://img.shields.io/npm/v/postcss-env-function.svg
133129
[npm-url]: https://www.npmjs.com/package/postcss-env-function
134130

135131
[CSS Environment Variables]: https://drafts.csswg.org/css-env-1/

plugins/postcss-env-function/package.json

Lines changed: 47 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -7,53 +7,71 @@
77
"repository": "csstools/postcss-env-function",
88
"homepage": "https://github.com/csstools/postcss-env-function#readme",
99
"bugs": "https://github.com/csstools/postcss-env-function/issues",
10-
"main": "index.cjs.js",
11-
"module": "index.esm.mjs",
10+
"main": "dist/index.js",
11+
"module": "dist/index.mjs",
1212
"files": [
13-
"index.cjs.js",
14-
"index.cjs.js.map",
15-
"index.esm.mjs",
16-
"index.esm.mjs.map"
13+
"dist"
1714
],
1815
"scripts": {
19-
"prepublishOnly": "npm test",
20-
"pretest:tape": "rollup -c .rollup.js --silent",
21-
"test": "npm run test:js && npm run test:tape",
22-
"test:js": "eslint src/{*,**/*}.js --cache --ignore-path .gitignore --quiet",
23-
"test:tape": "postcss-tape"
16+
"build": "npx rollup -c .rollup.js",
17+
"build:watch": "npx rollup -c .rollup.js --watch",
18+
"lint": "npx eslint --cache src",
19+
"lint:fix": "npx eslint --cache --fix",
20+
"pretest": "npm install && npm run build",
21+
"test": "npm run lint && npm run tape",
22+
"tape": "npx postcss-tape",
23+
"prepublishOnly": "npm test"
2424
},
2525
"engines": {
2626
"node": ">=8.0.0"
2727
},
2828
"dependencies": {
29-
"postcss": "^7.0.17",
30-
"postcss-values-parser": "^3.0.4"
29+
"postcss": "^7.0.27",
30+
"postcss-values-parser": "^3.2.0"
3131
},
3232
"devDependencies": {
33-
"@babel/core": "^7.4.5",
34-
"@babel/plugin-syntax-dynamic-import": "^7.2.0",
35-
"@babel/preset-env": "^7.4.5",
36-
"babel-eslint": "^10.0.1",
37-
"eslint": "^5.16.0",
38-
"postcss-tape": "^5.0.0",
33+
"@babel/core": "^7.9.0",
34+
"@babel/preset-env": "^7.9.5",
35+
"babel-eslint": "^10.1.0",
36+
"eslint": "^6.8.0",
37+
"postcss-tape": "^5.0.2",
3938
"pre-commit": "^1.2.2",
40-
"rollup": "^1.15.3",
41-
"rollup-plugin-babel": "^4.3.2"
39+
"rollup": "^2.7.2",
40+
"rollup-plugin-babel": "^4.4.0"
41+
},
42+
"babel": {
43+
"presets": [
44+
[
45+
"@babel/env",
46+
{
47+
"targets": "maintained node versions"
48+
}
49+
]
50+
]
4251
},
4352
"eslintConfig": {
4453
"env": {
45-
"browser": true,
4654
"es6": true,
4755
"node": true
4856
},
4957
"extends": "eslint:recommended",
50-
"parser": "babel-eslint",
51-
"parserOptions": {
52-
"ecmaVersion": 2018,
53-
"impliedStrict": true,
54-
"sourceType": "module"
55-
},
56-
"root": true
58+
"parser": "babel-eslint"
59+
},
60+
"rollup": {
61+
"input": "src/index.js",
62+
"plugins": [
63+
"rollup-plugin-babel"
64+
],
65+
"output": [
66+
{
67+
"file": "dist/index.js",
68+
"format": "cjs"
69+
},
70+
{
71+
"file": "dist/index.mjs",
72+
"format": "esm"
73+
}
74+
]
5775
},
5876
"keywords": [
5977
"postcss",

0 commit comments

Comments
 (0)