Skip to content

Commit b6f33e6

Browse files
committed
chore(Babel): Migrate on babel-preset-env, remove es build.
1 parent 660feea commit b6f33e6

File tree

4 files changed

+171
-124
lines changed

4 files changed

+171
-124
lines changed

.babelrc

Lines changed: 12 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -1,35 +1,14 @@
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+
["transform-runtime", { "polyfill": false }]
6+
],
7+
"presets": [
8+
["env", {
9+
"targets": {
10+
"node": 4
11+
},
12+
}]
13+
],
3514
}

.eslintignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
lib/*
2-
es/*
2+
flow-typed/*

package.json

Lines changed: 5 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,9 @@
33
"version": "0.0.0-semantically-released",
44
"description": "Plugin for `graphql-compose` which wraps graphql types with Relay specific logic.",
55
"files": [
6-
"es",
76
"lib"
87
],
98
"main": "lib/index.js",
10-
"jsnext:main": "es/index.js",
119
"repository": {
1210
"type": "git",
1311
"url": "https://github.com/nodkz/graphql-compose-relay.git"
@@ -28,15 +26,12 @@
2826
},
2927
"devDependencies": {
3028
"babel-cli": "^6.24.1",
31-
"babel-core": "^6.24.1",
3229
"babel-eslint": "^7.2.3",
33-
"babel-plugin-syntax-async-functions": "6.13.0",
34-
"babel-plugin-transform-class-properties": "^6.24.1",
30+
"babel-jest": "^20.0.3",
3531
"babel-plugin-transform-flow-strip-types": "^6.22.0",
3632
"babel-plugin-transform-object-rest-spread": "^6.23.0",
37-
"babel-plugin-transform-regenerator": "^6.24.1",
3833
"babel-plugin-transform-runtime": "^6.23.0",
39-
"babel-preset-es2015": "^6.24.1",
34+
"babel-preset-env": "^1.5.2",
4035
"chai": "^4.0.1",
4136
"chai-as-promised": "^6.0.0",
4237
"chai-spies": "0.7.1",
@@ -49,10 +44,10 @@
4944
"eslint-plugin-prettier": "^2.1.1",
5045
"flow-bin": "^0.47.0",
5146
"graphql": "^0.10.1",
52-
"graphql-compose": "^1.19.3",
47+
"graphql-compose": "^1.20.4",
5348
"mocha": "^3.4.2",
5449
"nyc": "^11.0.2",
55-
"prettier": "^1.4.2",
50+
"prettier": "^1.4.4",
5651
"rimraf": "^2.6.1",
5752
"sane": "^1.7.0",
5853
"semantic-release": "^6.3.6"
@@ -65,22 +60,9 @@
6560
"path": "./node_modules/cz-conventional-changelog"
6661
}
6762
},
68-
"nyc": {
69-
"exclude": [
70-
"**/__mocks__/**",
71-
"**/__tests__/**",
72-
"resources",
73-
"node_modules"
74-
],
75-
"reporter": [
76-
"lcov",
77-
"text"
78-
]
79-
},
8063
"scripts": {
81-
"build": "npm run build-cjs && npm run build-flow && npm run build-es",
64+
"build": "npm run build-cjs && npm run build-flow",
8265
"build-cjs": "rimraf lib && babel src --ignore __tests__,__mocks__ -d lib",
83-
"build-es": "rimraf es && BABEL_ENV=es babel src --ignore __tests__,__mocks__ -d es",
8466
"build-flow": "find ./src -name '*.js' -not -path '*/__*' | while read filepath; do cp $filepath `echo $filepath | sed 's/\\/src\\//\\/lib\\//g'`.flow; done",
8567
"coverage": "nyc npm run test",
8668
"lint": "eslint src test *.js",

0 commit comments

Comments
 (0)