From 6315aa46999a5a720f124323dfa7af856caf664c Mon Sep 17 00:00:00 2001 From: Gitlab-CI Date: Sat, 24 Nov 2018 03:41:37 +0700 Subject: [PATCH] feat(babel): upgrade to babel 7 and update @bootstrap-styled/v4 --- .babelrc | 35 ----------------------------------- .npmignore | 7 +++++++ babel.config.js | 42 ++++++++++++++++++++++++++++++++++++++++++ package.json | 48 +++++++++++++++++++++++++----------------------- rollup.config.js | 2 +- 5 files changed, 75 insertions(+), 59 deletions(-) delete mode 100644 .babelrc create mode 100644 babel.config.js diff --git a/.babelrc b/.babelrc deleted file mode 100644 index 546f92b..0000000 --- a/.babelrc +++ /dev/null @@ -1,35 +0,0 @@ -{ - "only": [ - "src", - "styleguide" - ], - "presets": [ - [ - "env", - { - "modules": false - } - ], - "stage-2", - "react" - ], - "plugins": [ - "array-includes", - "transform-class-properties", - "styled-components" - ], - "env": { - "production": { - "plugins": [ - "add-module-exports", - "transform-es2015-modules-commonjs" - ] - }, - "test": { - "plugins": [ - "transform-es2015-modules-commonjs", - "dynamic-import-node" - ] - } - } -} \ No newline at end of file diff --git a/.npmignore b/.npmignore index 032e99e..002ae5b 100644 --- a/.npmignore +++ b/.npmignore @@ -1,4 +1,11 @@ src sonar-project.properties .gitlab-ci.yml +.travis.yml +.npmrc +CONTRIBUTING.md +CODE_OF_CONDUCT.md +CHANGELOG.md internals +babel.config.js +babel.ext.json \ No newline at end of file diff --git a/babel.config.js b/babel.config.js new file mode 100644 index 0000000..ed6272a --- /dev/null +++ b/babel.config.js @@ -0,0 +1,42 @@ +module.exports = { + only: [ + 'src', + 'styleguide', + ], + presets: [ + [ + '@babel/preset-env', + { + modules: false, + }, + ], + '@babel/preset-react', + ], + plugins: [ + 'styled-components', + '@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, + }, + ], + ], + env: { + production: { + plugins: [ + 'add-module-exports', + '@babel/plugin-transform-modules-commonjs', + ], + }, + test: { + plugins: [ + '@babel/plugin-transform-modules-commonjs', + 'dynamic-import-node', + ], + }, + }, +}; diff --git a/package.json b/package.json index 0cba573..87f8991 100644 --- a/package.json +++ b/package.json @@ -135,34 +135,36 @@ ] }, "devDependencies": { - "@semantic-release/changelog": "^2.0.2", + "@babel/cli": "^7.0.0", + "@babel/core": "^7.0.0", + "@babel/plugin-external-helpers": "^7.0.0", + "@babel/plugin-proposal-class-properties": "^7.0.0", + "@babel/plugin-proposal-decorators": "^7.0.0", + "@babel/plugin-proposal-json-strings": "^7.0.0", + "@babel/plugin-proposal-object-rest-spread": "^7.0.0", + "@babel/plugin-syntax-dynamic-import": "^7.0.0", + "@babel/plugin-syntax-import-meta": "^7.0.0", + "@babel/plugin-transform-modules-commonjs": "^7.0.0", + "@babel/plugin-transform-react-constant-elements": "^7.0.0", + "@babel/plugin-transform-react-inline-elements": "^7.0.0", + "@babel/preset-env": "^7.0.0", + "@babel/preset-react": "^7.0.0", + "@semantic-release/changelog": "^3.0.1", "@semantic-release/exec": "^3.3.0", - "@semantic-release/git": "^5.0.0", + "@semantic-release/git": "^7.0.5", "@semantic-release/github": "^5.2.1", - "@semantic-release/npm": "^3.3.1", - "@yeutech-lab/rollup-umd-documentation": "^2.4.4", - "babel-cli": "^6.26.0", - "babel-eslint": "^7.2.3", - "babel-jest": "^22.4.1", - "babel-loader": "^7.1.4", + "@semantic-release/npm": "^5.1.1", + "@yeutech-lab/rollup-umd-documentation": "^2.4.5", + "babel-core": "^7.0.0-bridge.0", + "babel-eslint": "^9.0.0", + "babel-jest": "^23.4.2", + "babel-loader": "^8.0.0", "babel-plugin-add-module-exports": "^0.2.1", - "babel-plugin-array-includes": "^2.0.3", "babel-plugin-dynamic-import-node": "^1.1.0", - "babel-plugin-external-helpers": "^6.22.0", "babel-plugin-react-intl": "^2.4.0", "babel-plugin-react-transform": "^3.0.0", "babel-plugin-styled-components": "^1.5.1", - "babel-plugin-transform-class-properties": "^6.24.1", - "babel-plugin-transform-es2015-modules-commonjs": "^6.26.0", - "babel-plugin-transform-object-rest-spread": "^6.26.0", - "babel-plugin-transform-react-constant-elements": "^6.23.0", - "babel-plugin-transform-react-inline-elements": "^6.22.0", "babel-plugin-transform-react-remove-prop-types": "^0.4.13", - "babel-preset-env": "^1.6.1", - "babel-preset-es2015": "^6.24.1", - "babel-preset-react": "^6.24.1", - "babel-preset-stage-2": "^6.24.1", - "babel-preset-stage-3": "^6.24.1", "cz-conventional-changelog": "^2.1.0", "enzyme": "^3.3.0", "enzyme-adapter-react-16": "^1.1.1", @@ -187,7 +189,7 @@ "react-test-renderer": "^16.3.2", "redux": "^4.0.1", "rollup": "^0.57.1", - "rollup-plugin-babel": "^3.0.3", + "rollup-plugin-babel": "^4.0.1", "rollup-plugin-cleanup": "^2.0.0", "rollup-plugin-commonjs": "^9.1.0", "rollup-plugin-inject": "^2.0.0", @@ -198,7 +200,7 @@ "rollup-plugin-uglify": "^3.0.0", "rollup-plugin-visualizer": "^0.5.0", "rollup-watch": "^4.3.1", - "semantic-release": "^15.5.2", + "semantic-release": "^15.12.1", "sinon": "^2.3.2", "styled-components": "^4.1.1", "toctoc": "^0.3.2", @@ -217,7 +219,7 @@ "extract-intl:doc" ], "dependencies": { - "@bootstrap-styled/v4": "^1.2.2", + "@bootstrap-styled/v4": "^1.2.6", "prop-types": "^15.6.1" }, "peerDependencies": { diff --git a/rollup.config.js b/rollup.config.js index d781bc7..c9bf0ac 100644 --- a/rollup.config.js +++ b/rollup.config.js @@ -60,7 +60,7 @@ const plugins = [ }), json(), babel({ - plugins: ['external-helpers'], + babelrc: false, exclude: 'node_modules/**', }), cleanup(),