Skip to content

Commit 797d678

Browse files
remove node@4 support (#151)
* remove node@4 support * remove babel * add engine field * up lock file * add options description
1 parent 1ab8eb1 commit 797d678

File tree

4 files changed

+40
-1263
lines changed

4 files changed

+40
-1263
lines changed

.travis.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
language: node_js
22
node_js:
3-
- "4"
43
- "6"
54
- "node"
65

README.md

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,11 +31,27 @@ into:
3131
composes: className [... className] from "path/to/file.css";
3232
```
3333

34+
## Options
35+
36+
- `failOnWrongOrder` `bool` generates exception for unpredictable imports order.
37+
38+
```css
39+
.aa {
40+
composes: b from './b.css';
41+
composes: c from './c.css';
42+
}
43+
44+
.bb {
45+
/* "b.css" should be before "c.css" in this case */
46+
composes: c from './c.css';
47+
composes: b from './b.css';
48+
}
49+
```
50+
3451
## Building
3552

3653
```
3754
npm install
38-
npm build
3955
npm test
4056
```
4157

package.json

Lines changed: 7 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,35 +1,25 @@
11
{
22
"name": "postcss-modules-extract-imports",
3-
"version": "1.2.1",
3+
"version": "2.0.0",
44
"description": "A CSS Modules transform to extract local aliases for inline imports",
5-
"main": "lib/index.js",
5+
"main": "src/index.js",
6+
"engines": {
7+
"node": ">= 6"
8+
},
69
"files": [
7-
"lib"
10+
"src"
811
],
912
"scripts": {
10-
"build": "babel --out-dir lib src",
1113
"test": "jest --coverage",
1214
"precommit": "lint-staged",
13-
"prepublish": "yarn run test && yarn run build"
15+
"prepublish": "yarn run test"
1416
},
1517
"lint-staged": {
1618
"*.js": [
1719
"prettier --single-quote --no-semi --write",
1820
"git add"
1921
]
2022
},
21-
"babel": {
22-
"presets": [
23-
[
24-
"env",
25-
{
26-
"targets": {
27-
"node": 4
28-
}
29-
}
30-
]
31-
]
32-
},
3323
"repository": {
3424
"type": "git",
3525
"url": "https://github.com/css-modules/postcss-modules-extract-imports.git"
@@ -49,10 +39,6 @@
4939
"postcss": "^7.0.5"
5040
},
5141
"devDependencies": {
52-
"babel-cli": "^6.24.1",
53-
"babel-eslint": "^7.2.2",
54-
"babel-jest": "^20.0.3",
55-
"babel-preset-env": "^1.5.1",
5642
"codecov.io": "^0.1.2",
5743
"coveralls": "^2.11.2",
5844
"husky": "^0.13.3",

0 commit comments

Comments
 (0)