Skip to content

Commit

Permalink
feat(*): switch to Babel 7️⃣
Browse files Browse the repository at this point in the history
  • Loading branch information
CharlesMangwa committed Oct 5, 2018
1 parent 61d1544 commit c3bd2a3
Show file tree
Hide file tree
Showing 4 changed files with 2,284 additions and 935 deletions.
75 changes: 58 additions & 17 deletions package.json
Expand Up @@ -35,14 +35,40 @@
"babel": {
"presets": [
[
"env",
"@babel/preset-env",
{
"loose": true
}
],
"stage-1",
"react",
"flow"
"@babel/preset-react",
"@babel/preset-flow"
],
"plugins": [
"@babel/plugin-syntax-dynamic-import",
"@babel/plugin-syntax-import-meta",
"@babel/plugin-proposal-class-properties",
"@babel/plugin-proposal-json-strings",
[
"@babel/plugin-proposal-decorators",
{
"legacy": true
}
],
"@babel/plugin-proposal-function-sent",
"@babel/plugin-proposal-export-namespace-from",
"@babel/plugin-proposal-numeric-separator",
"@babel/plugin-proposal-throw-expressions",
"@babel/plugin-proposal-export-default-from",
"@babel/plugin-proposal-logical-assignment-operators",
"@babel/plugin-proposal-optional-chaining",
[
"@babel/plugin-proposal-pipeline-operator",
{
"proposal": "minimal"
}
],
"@babel/plugin-proposal-nullish-coalescing-operator",
"@babel/plugin-proposal-do-expressions"
]
},
"jest": {
Expand All @@ -60,26 +86,41 @@
"react": ">=15 || ^16"
},
"dependencies": {
"babel-runtime": "^6.26.0",
"@babel/runtime": "^7.0.0",
"create-react-context": "^0.2.3",
"invariant": "^2.2.4",
"prop-types": "^15.6.2",
"react-lifecycles-compat": "^3.0.4"
},
"devDependencies": {
"babel-cli": "^6.26.0",
"babel-core": "6.26.3",
"@babel/cli": "^7.0.0",
"@babel/core": "^7.0.0",
"@babel/plugin-proposal-class-properties": "^7.0.0",
"@babel/plugin-proposal-decorators": "^7.0.0",
"@babel/plugin-proposal-do-expressions": "^7.0.0",
"@babel/plugin-proposal-export-default-from": "^7.0.0",
"@babel/plugin-proposal-export-namespace-from": "^7.0.0",
"@babel/plugin-proposal-function-sent": "^7.0.0",
"@babel/plugin-proposal-json-strings": "^7.0.0",
"@babel/plugin-proposal-logical-assignment-operators": "^7.0.0",
"@babel/plugin-proposal-nullish-coalescing-operator": "^7.0.0",
"@babel/plugin-proposal-numeric-separator": "^7.0.0",
"@babel/plugin-proposal-optional-chaining": "^7.0.0",
"@babel/plugin-proposal-pipeline-operator": "^7.0.0",
"@babel/plugin-proposal-throw-expressions": "^7.0.0",
"@babel/plugin-syntax-dynamic-import": "^7.0.0",
"@babel/plugin-syntax-import-meta": "^7.0.0",
"@babel/plugin-transform-runtime": "^7.0.0",
"@babel/preset-env": "^7.0.0",
"@babel/preset-flow": "^7.0.0",
"@babel/preset-react": "^7.0.0",
"babel-core": "^7.0.0-bridge.0",
"babel-eslint": "^10.0.1",
"babel-jest": "^23.6.0",
"babel-plugin-dev-expression": "^0.2.1",
"babel-plugin-external-helpers": "^6.22.0",
"babel-plugin-transform-react-remove-prop-types": "^0.4.18",
"babel-plugin-transform-runtime": "^6.23.0",
"babel-preset-env": "^1.7.0",
"babel-preset-flow": "^6.23.0",
"babel-preset-react": "^6.24.1",
"babel-preset-stage-1": "^6.24.1",
"coveralls": "^3.0.2",
"eslint": "^5.6.0",
"eslint": "^5.6.1",
"eslint-config-airbnb": "^17.1.0",
"eslint-config-prettier": "^3.1.0",
"eslint-plugin-babel": "^5.2.1",
Expand All @@ -88,7 +129,7 @@
"eslint-plugin-jsx-a11y": "^6.1.1",
"eslint-plugin-prettier": "^2.7.0",
"eslint-plugin-react": "7.11.1",
"flow-bin": "0.81.0",
"flow-bin": "0.82.0",
"gzip-size": "^5.0.0",
"husky": "^0.14.3",
"jest": "^23.6.0",
Expand All @@ -100,8 +141,8 @@
"react": "^16.5.2",
"react-test-renderer": "16.5.2",
"rimraf": "^2.6.2",
"rollup": "^0.66.2",
"rollup-plugin-babel": "^3.0.7",
"rollup": "^0.66.4",
"rollup-plugin-babel": "^4.0.3",
"rollup-plugin-commonjs": "^9.1.8",
"rollup-plugin-node-resolve": "^3.4.0",
"rollup-plugin-replace": "^2.0.0",
Expand Down
Binary file added react-data-fetching-v1.0.0-beta.1.tgz
Binary file not shown.
44 changes: 27 additions & 17 deletions scripts/config.js
Expand Up @@ -23,39 +23,49 @@ const getPlugins = env => {
babelrc: false,
presets: [
[
'env',
'@babel/preset-env',
{
loose: true,
modules: false,
targets: {
node: 'current',
browser: '> 1%, last 2 versions',
browsers: '> 1%, last 2 versions',
},
},
],
'stage-1',
'flow',
'react',
'@babel/preset-flow',
'@babel/preset-react',
],
plugins: [
'external-helpers',
'dev-expression',
['@babel/plugin-transform-runtime', { helpers: false }],
'@babel/plugin-syntax-dynamic-import',
'@babel/plugin-syntax-import-meta',
'@babel/plugin-proposal-class-properties',
'@babel/plugin-proposal-json-strings',
[
'transform-runtime',
'@babel/plugin-proposal-decorators',
{
helpers: false,
polyfill: false,
regenerator: true,
legacy: true,
},
],
'@babel/plugin-proposal-function-sent',
'@babel/plugin-proposal-export-namespace-from',
'@babel/plugin-proposal-numeric-separator',
'@babel/plugin-proposal-throw-expressions',
'@babel/plugin-proposal-export-default-from',
'@babel/plugin-proposal-logical-assignment-operators',
'@babel/plugin-proposal-optional-chaining',
[
'@babel/plugin-proposal-pipeline-operator',
{
proposal: 'minimal',
},
],
'@babel/plugin-proposal-nullish-coalescing-operator',
'@babel/plugin-proposal-do-expressions',
].concat(
env === 'production'
? [
'dev-expression',
'transform-react-remove-prop-types',
'transform-flow-strip-types',
]
: []
env === 'production' ? ['transform-react-remove-prop-types'] : []
),
}),
commonjs({
Expand Down

0 comments on commit c3bd2a3

Please sign in to comment.