Skip to content

Commit 360bedf

Browse files
committed
feat(Babel): Migrate to babel-env. Remove es build.
1 parent 7c8beb7 commit 360bedf

File tree

2 files changed

+14
-45
lines changed

2 files changed

+14
-45
lines changed

.babelrc

Lines changed: 11 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -1,35 +1,13 @@
11
{
2-
"env": {
3-
"development": {
4-
"passPerPreset": true,
5-
"presets": [
6-
{ "plugins": [ "transform-runtime" ] },
7-
{
8-
"passPerPreset": false,
9-
"presets": ["es2015"]
10-
}
11-
],
12-
"plugins": [
13-
"syntax-async-functions",
14-
"transform-regenerator",
15-
"transform-class-properties",
16-
"transform-object-rest-spread",
17-
"transform-flow-strip-types"
18-
]
19-
},
20-
"es": {
21-
"presets": [
22-
["es2015", {"modules": false}]
23-
],
24-
"plugins": [
25-
"syntax-async-functions",
26-
["transform-regenerator", {
27-
"async": false
28-
}],
29-
"transform-class-properties",
30-
"transform-object-rest-spread",
31-
"transform-flow-strip-types",
32-
]
33-
}
34-
}
2+
"plugins": [
3+
"transform-object-rest-spread",
4+
"transform-flow-strip-types"
5+
],
6+
"presets": [
7+
["env", {
8+
"targets": {
9+
"node": 4
10+
},
11+
}]
12+
],
3513
}

package.json

Lines changed: 3 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
"version": "0.0.0-semantically-released",
44
"description": "Plugin for `graphql-compose` which provide a connection resolver for types.",
55
"files": [
6-
"es",
76
"lib",
87
"README.md"
98
],
@@ -29,18 +28,13 @@
2928
},
3029
"devDependencies": {
3130
"babel-cli": "^6.24.1",
32-
"babel-core": "^6.24.1",
3331
"babel-eslint": "^7.2.3",
34-
"babel-plugin-syntax-async-functions": "6.13.0",
35-
"babel-plugin-transform-class-properties": "^6.24.1",
3632
"babel-plugin-transform-flow-strip-types": "^6.22.0",
3733
"babel-plugin-transform-object-rest-spread": "^6.23.0",
38-
"babel-plugin-transform-regenerator": "^6.24.1",
39-
"babel-plugin-transform-runtime": "^6.23.0",
40-
"babel-preset-es2015": "^6.24.1",
4134
"chai": "^4.0.1",
4235
"chai-as-promised": "6.0.0",
4336
"chai-spies": "0.7.1",
37+
"babel-preset-env": "^1.5.1",
4438
"cz-conventional-changelog": "^2.0.0",
4539
"eslint": "^3.19.0",
4640
"eslint-config-airbnb-base": "^11.2.0",
@@ -58,9 +52,7 @@
5852
"sane": "^1.7.0",
5953
"semantic-release": "^6.3.2"
6054
},
61-
"dependencies": {
62-
"babel-runtime": "^6.23.0"
63-
},
55+
"dependencies": {},
6456
"config": {
6557
"commitizen": {
6658
"path": "./node_modules/cz-conventional-changelog"
@@ -79,9 +71,8 @@
7971
]
8072
},
8173
"scripts": {
82-
"build": "npm run build-cjs && npm run build-flow && npm run build-es",
74+
"build": "npm run build-cjs && npm run build-flow",
8375
"build-cjs": "rimraf lib && babel src --ignore __tests__,__mocks__ -d lib",
84-
"build-es": "rimraf es && BABEL_ENV=es babel src --ignore __tests__,__mocks__ -d es",
8576
"build-flow": "find ./src -name '*.js' -not -path '*/__*' | while read filepath; do cp $filepath `echo $filepath | sed 's/\\/src\\//\\/lib\\//g'`.flow; done",
8677
"coverage": "nyc npm run test",
8778
"lint": "eslint src test *.js",

0 commit comments

Comments
 (0)