Skip to content

Commit

Permalink
build: update on babel@7
Browse files Browse the repository at this point in the history
  • Loading branch information
nodkz committed Sep 6, 2018
1 parent 827ea30 commit 4cb5776
Show file tree
Hide file tree
Showing 3 changed files with 826 additions and 511 deletions.
17 changes: 8 additions & 9 deletions .babelrc
Original file line number Diff line number Diff line change
@@ -1,29 +1,28 @@
{
"plugins": [
"babel-plugin-transform-object-rest-spread",
"babel-plugin-transform-flow-strip-types",
"@babel/plugin-proposal-object-rest-spread",
"@babel/plugin-transform-flow-strip-types"
],
"env": {
"lib": {
"plugins": [
"babel-plugin-transform-class-properties",
"@babel/plugin-proposal-class-properties"
],
"presets": [
["env", {
["@babel/preset-env", {
"targets": {
"browsers": [
"last 5 versions",
"ie 9",
"defaults"
]
},
"include": ["transform-es2015-classes"]
}
}]
]
},
"es": {
"presets": [
["env", {
["@babel/preset-env", {
"targets": {
"chrome": 52
},
Expand All @@ -34,10 +33,10 @@
},
"test": {
"presets": [
["env", {
["@babel/preset-env", {
"targets": {
"node": "current"
},
}
}]
]
}
Expand Down
42 changes: 28 additions & 14 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,16 +1,26 @@
{
"name": "react-relay-network-layer",
"version": "0.0.0-semantically-released",
"description":
"Network Layer for React Relay and Express (Batch Queries, AuthToken, Logging, Retry)",
"files": ["es", "lib"],
"description": "Network Layer for React Relay and Express (Batch Queries, AuthToken, Logging, Retry)",
"files": [
"es",
"lib"
],
"main": "lib/index.js",
"jsnext:main": "es/index.js",
"repository": {
"type": "git",
"url": "https://github.com/nodkz/react-relay-network-layer.git"
},
"keywords": ["relay", "react", "network layer", "batch", "express", "jwt", "auth token"],
"keywords": [
"relay",
"react",
"network layer",
"batch",
"express",
"jwt",
"auth token"
],
"license": "MIT",
"bugs": {
"url": "https://github.com/nodkz/react-relay-network-layer/issues"
Expand All @@ -21,15 +31,18 @@
"react-relay": ">=0.7.0"
},
"devDependencies": {
"babel-cli": "^6.26.0",
"@babel/cli": "^7.0.0",
"@babel/core": "^7.0.0",
"@babel/plugin-proposal-class-properties": "^7.0.0",
"@babel/plugin-proposal-object-rest-spread": "^7.0.0",
"@babel/plugin-transform-flow-strip-types": "^7.0.0",
"@babel/polyfill": "^7.0.0",
"@babel/preset-env": "^7.0.0",
"@babel/register": "^7.0.0",
"@babel/preset-flow": "^7.0.0",
"babel-core": "^7.0.0-bridge.0",
"babel-eslint": "^8.2.3",
"babel-jest": "^22.4.4",
"babel-plugin-transform-class-properties": "^6.24.1",
"babel-plugin-transform-flow-strip-types": "^6.22.0",
"babel-plugin-transform-object-rest-spread": "^6.26.0",
"babel-polyfill": "^6.26.0",
"babel-preset-env": "^1.7.0",
"babel-register": "^6.26.0",
"cz-conventional-changelog": "^2.1.0",
"eslint": "^4.19.1",
"eslint-config-airbnb-base": "^12.1.0",
Expand All @@ -51,14 +64,15 @@
}
},
"jest": {
"roots": ["<rootDir>/src"]
"roots": [
"<rootDir>/src"
]
},
"scripts": {
"build": "npm run build-lib && npm run build-es && npm run build-flow",
"build-lib": "rimraf lib && BABEL_ENV=lib babel src --ignore __tests__,__mocks__ -d lib",
"build-es": "rimraf es && BABEL_ENV=es babel src --ignore __tests__,__mocks__ -d es",
"build-flow":
"find ./src -name '*.js' -not -path '*/__*' | while read filepath; do cp $filepath `echo $filepath | sed 's/\\/src\\//\\/lib\\//g'`.flow; done",
"build-flow": "find ./src -name '*.js' -not -path '*/__*' | while read filepath; do cp $filepath `echo $filepath | sed 's/\\/src\\//\\/lib\\//g'`.flow; done",
"lint": "eslint src test *.js",
"coverage": "jest --coverage --maxWorkers 2",
"watch": "jest --watch",
Expand Down
Loading

0 comments on commit 4cb5776

Please sign in to comment.