From 39ab29f0cdd5a130bff473578e50ca5d4b01f862 Mon Sep 17 00:00:00 2001 From: jochen Date: Tue, 8 Jun 2021 11:01:50 +0200 Subject: [PATCH] Cleanup code --- package.json | 2 +- packages/accordion/rollup.config.js | 5 +---- packages/alert/rollup.config.js | 5 +---- packages/autocomplete/rollup.config.js | 5 +---- packages/avatar/rollup.config.js | 5 +---- packages/badge/rollup.config.js | 5 +---- packages/breadcrumbs/rollup.config.js | 5 +---- packages/button/rollup.config.js | 5 +---- packages/calendar/rollup.config.js | 5 +---- packages/card/rollup.config.js | 5 +---- packages/contact/rollup.config.js | 5 +---- packages/content/rollup.config.js | 5 +---- packages/flyout-button/rollup.config.js | 5 +---- packages/flyout/rollup.config.js | 5 +---- packages/footer/rollup.config.js | 5 +---- packages/form/rollup.config.js | 5 +---- packages/header/rollup.config.js | 5 +---- packages/hero/rollup.config.js | 5 +---- packages/icon/rollup.config.js | 5 +---- packages/label/rollup.config.js | 5 +---- packages/link/rollup.config.js | 5 +---- packages/modal/rollup.config.js | 5 +---- packages/pagination/rollup.config.js | 5 +---- packages/slider/rollup.config.js | 5 +---- packages/spinner/rollup.config.js | 5 +---- packages/steps/rollup.config.js | 5 +---- packages/switch/rollup.config.js | 5 +---- packages/tabs/rollup.config.js | 5 +---- packages/taglist/rollup.config.js | 5 +---- packages/toggle/rollup.config.js | 5 +---- packages/user-menu/rollup.config.js | 5 +---- webpack.config.js | 2 +- 32 files changed, 32 insertions(+), 122 deletions(-) diff --git a/package.json b/package.json index 4cbf48d1..4588dc14 100644 --- a/package.json +++ b/package.json @@ -12,7 +12,7 @@ "homepage": "http://digipolisantwerp.github.io/antwerp-ui_react", "scripts": { "start": "npx styleguidist server", - "test": "jest", + "test": "jest --coverage", "bootstrap": "lerna bootstrap", "build": "lerna exec --parallel -- rollup -c", "postbuild": "rollup -c", diff --git a/packages/accordion/rollup.config.js b/packages/accordion/rollup.config.js index fcc267e2..aa4eed3d 100644 --- a/packages/accordion/rollup.config.js +++ b/packages/accordion/rollup.config.js @@ -13,10 +13,7 @@ export default { babel({ babelHelpers: 'bundled', exclude: ['node_modules/**'], - presets: [ - "@babel/preset-flow", - "@babel/preset-react" - ] + configFile: "../../babel.config.js" }) ], external: ['react', 'classnames'], diff --git a/packages/alert/rollup.config.js b/packages/alert/rollup.config.js index 16205ca3..3dc4393f 100644 --- a/packages/alert/rollup.config.js +++ b/packages/alert/rollup.config.js @@ -15,10 +15,7 @@ export default { babel({ babelHelpers: 'bundled', exclude: ['node_modules/**'], - presets: [ - "@babel/preset-flow", - "@babel/preset-react" - ] + configFile: "../../babel.config.js" }) ], external: ['react', 'classnames'], diff --git a/packages/autocomplete/rollup.config.js b/packages/autocomplete/rollup.config.js index 1cae5929..b941da8b 100644 --- a/packages/autocomplete/rollup.config.js +++ b/packages/autocomplete/rollup.config.js @@ -15,10 +15,7 @@ export default { babel({ babelHelpers: 'bundled', exclude: ['node_modules/**'], - presets: [ - "@babel/preset-flow", - "@babel/preset-react" - ] + configFile: "../../babel.config.js" }) ], external: ['react', 'react-dom', 'classnames', 'react-input-mask'], diff --git a/packages/avatar/rollup.config.js b/packages/avatar/rollup.config.js index 16205ca3..3dc4393f 100644 --- a/packages/avatar/rollup.config.js +++ b/packages/avatar/rollup.config.js @@ -15,10 +15,7 @@ export default { babel({ babelHelpers: 'bundled', exclude: ['node_modules/**'], - presets: [ - "@babel/preset-flow", - "@babel/preset-react" - ] + configFile: "../../babel.config.js" }) ], external: ['react', 'classnames'], diff --git a/packages/badge/rollup.config.js b/packages/badge/rollup.config.js index fcc267e2..aa4eed3d 100644 --- a/packages/badge/rollup.config.js +++ b/packages/badge/rollup.config.js @@ -13,10 +13,7 @@ export default { babel({ babelHelpers: 'bundled', exclude: ['node_modules/**'], - presets: [ - "@babel/preset-flow", - "@babel/preset-react" - ] + configFile: "../../babel.config.js" }) ], external: ['react', 'classnames'], diff --git a/packages/breadcrumbs/rollup.config.js b/packages/breadcrumbs/rollup.config.js index ee6c6100..49cecea8 100644 --- a/packages/breadcrumbs/rollup.config.js +++ b/packages/breadcrumbs/rollup.config.js @@ -15,10 +15,7 @@ export default { babel({ babelHelpers: 'bundled', exclude: ['node_modules/**'], - presets: [ - "@babel/preset-flow", - "@babel/preset-react" - ] + configFile: "../../babel.config.js" }) ], external: ['react', 'classnames', 'react-input-mask', 'moment', 'react-dom'], diff --git a/packages/button/rollup.config.js b/packages/button/rollup.config.js index 16205ca3..3dc4393f 100644 --- a/packages/button/rollup.config.js +++ b/packages/button/rollup.config.js @@ -15,10 +15,7 @@ export default { babel({ babelHelpers: 'bundled', exclude: ['node_modules/**'], - presets: [ - "@babel/preset-flow", - "@babel/preset-react" - ] + configFile: "../../babel.config.js" }) ], external: ['react', 'classnames'], diff --git a/packages/calendar/rollup.config.js b/packages/calendar/rollup.config.js index 53f2f8a1..b8507dce 100644 --- a/packages/calendar/rollup.config.js +++ b/packages/calendar/rollup.config.js @@ -15,10 +15,7 @@ export default { babel({ babelHelpers: 'bundled', exclude: ['node_modules/**'], - presets: [ - "@babel/preset-flow", - "@babel/preset-react" - ] + configFile: "../../babel.config.js" }) ], external: ['react', 'classnames', 'moment'], diff --git a/packages/card/rollup.config.js b/packages/card/rollup.config.js index 16205ca3..3dc4393f 100644 --- a/packages/card/rollup.config.js +++ b/packages/card/rollup.config.js @@ -15,10 +15,7 @@ export default { babel({ babelHelpers: 'bundled', exclude: ['node_modules/**'], - presets: [ - "@babel/preset-flow", - "@babel/preset-react" - ] + configFile: "../../babel.config.js" }) ], external: ['react', 'classnames'], diff --git a/packages/contact/rollup.config.js b/packages/contact/rollup.config.js index b1ce1be5..ccc6c9a9 100644 --- a/packages/contact/rollup.config.js +++ b/packages/contact/rollup.config.js @@ -15,10 +15,7 @@ export default { babel({ babelHelpers: 'bundled', exclude: ['node_modules/**'], - presets: [ - "@babel/preset-flow", - "@babel/preset-react" - ] + configFile: "../../babel.config.js" }) ], external: ['react'], diff --git a/packages/content/rollup.config.js b/packages/content/rollup.config.js index 16205ca3..3dc4393f 100644 --- a/packages/content/rollup.config.js +++ b/packages/content/rollup.config.js @@ -15,10 +15,7 @@ export default { babel({ babelHelpers: 'bundled', exclude: ['node_modules/**'], - presets: [ - "@babel/preset-flow", - "@babel/preset-react" - ] + configFile: "../../babel.config.js" }) ], external: ['react', 'classnames'], diff --git a/packages/flyout-button/rollup.config.js b/packages/flyout-button/rollup.config.js index 16205ca3..3dc4393f 100644 --- a/packages/flyout-button/rollup.config.js +++ b/packages/flyout-button/rollup.config.js @@ -15,10 +15,7 @@ export default { babel({ babelHelpers: 'bundled', exclude: ['node_modules/**'], - presets: [ - "@babel/preset-flow", - "@babel/preset-react" - ] + configFile: "../../babel.config.js" }) ], external: ['react', 'classnames'], diff --git a/packages/flyout/rollup.config.js b/packages/flyout/rollup.config.js index bc833dd2..28ff1b29 100644 --- a/packages/flyout/rollup.config.js +++ b/packages/flyout/rollup.config.js @@ -15,10 +15,7 @@ export default { babel({ babelHelpers: 'bundled', exclude: ['node_modules/**'], - presets: [ - "@babel/preset-flow", - "@babel/preset-react" - ] + configFile: "../../babel.config.js" }) ], external: ['react', 'react-dom', 'classnames'], diff --git a/packages/footer/rollup.config.js b/packages/footer/rollup.config.js index 16205ca3..3dc4393f 100644 --- a/packages/footer/rollup.config.js +++ b/packages/footer/rollup.config.js @@ -15,10 +15,7 @@ export default { babel({ babelHelpers: 'bundled', exclude: ['node_modules/**'], - presets: [ - "@babel/preset-flow", - "@babel/preset-react" - ] + configFile: "../../babel.config.js" }) ], external: ['react', 'classnames'], diff --git a/packages/form/rollup.config.js b/packages/form/rollup.config.js index 86822f25..012b7602 100644 --- a/packages/form/rollup.config.js +++ b/packages/form/rollup.config.js @@ -17,10 +17,7 @@ export default { babel({ babelHelpers: 'bundled', exclude: ['node_modules/**'], - presets: [ - "@babel/preset-flow", - "@babel/preset-react" - ] + configFile: "../../babel.config.js" }) ], external: ['react', 'classnames', 'react-input-mask', 'moment', 'react-dom'], diff --git a/packages/header/rollup.config.js b/packages/header/rollup.config.js index b6f940c8..9a9b0730 100644 --- a/packages/header/rollup.config.js +++ b/packages/header/rollup.config.js @@ -17,10 +17,7 @@ export default { babel({ babelHelpers: 'bundled', exclude: ['node_modules/**'], - presets: [ - "@babel/preset-flow", - "@babel/preset-react" - ] + configFile: "../../babel.config.js" }) ], external: ['react', 'classnames'], diff --git a/packages/hero/rollup.config.js b/packages/hero/rollup.config.js index 16205ca3..3dc4393f 100644 --- a/packages/hero/rollup.config.js +++ b/packages/hero/rollup.config.js @@ -15,10 +15,7 @@ export default { babel({ babelHelpers: 'bundled', exclude: ['node_modules/**'], - presets: [ - "@babel/preset-flow", - "@babel/preset-react" - ] + configFile: "../../babel.config.js" }) ], external: ['react', 'classnames'], diff --git a/packages/icon/rollup.config.js b/packages/icon/rollup.config.js index 16205ca3..3dc4393f 100644 --- a/packages/icon/rollup.config.js +++ b/packages/icon/rollup.config.js @@ -15,10 +15,7 @@ export default { babel({ babelHelpers: 'bundled', exclude: ['node_modules/**'], - presets: [ - "@babel/preset-flow", - "@babel/preset-react" - ] + configFile: "../../babel.config.js" }) ], external: ['react', 'classnames'], diff --git a/packages/label/rollup.config.js b/packages/label/rollup.config.js index 16205ca3..3dc4393f 100644 --- a/packages/label/rollup.config.js +++ b/packages/label/rollup.config.js @@ -15,10 +15,7 @@ export default { babel({ babelHelpers: 'bundled', exclude: ['node_modules/**'], - presets: [ - "@babel/preset-flow", - "@babel/preset-react" - ] + configFile: "../../babel.config.js" }) ], external: ['react', 'classnames'], diff --git a/packages/link/rollup.config.js b/packages/link/rollup.config.js index 16205ca3..3dc4393f 100644 --- a/packages/link/rollup.config.js +++ b/packages/link/rollup.config.js @@ -15,10 +15,7 @@ export default { babel({ babelHelpers: 'bundled', exclude: ['node_modules/**'], - presets: [ - "@babel/preset-flow", - "@babel/preset-react" - ] + configFile: "../../babel.config.js" }) ], external: ['react', 'classnames'], diff --git a/packages/modal/rollup.config.js b/packages/modal/rollup.config.js index f8389a48..a7b9db09 100644 --- a/packages/modal/rollup.config.js +++ b/packages/modal/rollup.config.js @@ -15,10 +15,7 @@ export default { babel({ babelHelpers: 'bundled', exclude: ['node_modules/**'], - presets: [ - "@babel/preset-flow", - "@babel/preset-react" - ] + configFile: "../../babel.config.js" }), ], external: ['react', 'classnames', 'react-modal'], diff --git a/packages/pagination/rollup.config.js b/packages/pagination/rollup.config.js index 401d5a06..7bf1e3f9 100644 --- a/packages/pagination/rollup.config.js +++ b/packages/pagination/rollup.config.js @@ -15,10 +15,7 @@ export default { babel({ babelHelpers: 'bundled', exclude: ["node_modules/**"], - presets: [ - "@babel/preset-flow", - "@babel/preset-react" - ] + configFile: "../../babel.config.js" }) ], external: ["react", "classnames", "react-modal"] diff --git a/packages/slider/rollup.config.js b/packages/slider/rollup.config.js index 16205ca3..3dc4393f 100644 --- a/packages/slider/rollup.config.js +++ b/packages/slider/rollup.config.js @@ -15,10 +15,7 @@ export default { babel({ babelHelpers: 'bundled', exclude: ['node_modules/**'], - presets: [ - "@babel/preset-flow", - "@babel/preset-react" - ] + configFile: "../../babel.config.js" }) ], external: ['react', 'classnames'], diff --git a/packages/spinner/rollup.config.js b/packages/spinner/rollup.config.js index 16205ca3..3dc4393f 100644 --- a/packages/spinner/rollup.config.js +++ b/packages/spinner/rollup.config.js @@ -15,10 +15,7 @@ export default { babel({ babelHelpers: 'bundled', exclude: ['node_modules/**'], - presets: [ - "@babel/preset-flow", - "@babel/preset-react" - ] + configFile: "../../babel.config.js" }) ], external: ['react', 'classnames'], diff --git a/packages/steps/rollup.config.js b/packages/steps/rollup.config.js index 16205ca3..3dc4393f 100644 --- a/packages/steps/rollup.config.js +++ b/packages/steps/rollup.config.js @@ -15,10 +15,7 @@ export default { babel({ babelHelpers: 'bundled', exclude: ['node_modules/**'], - presets: [ - "@babel/preset-flow", - "@babel/preset-react" - ] + configFile: "../../babel.config.js" }) ], external: ['react', 'classnames'], diff --git a/packages/switch/rollup.config.js b/packages/switch/rollup.config.js index 16205ca3..3dc4393f 100644 --- a/packages/switch/rollup.config.js +++ b/packages/switch/rollup.config.js @@ -15,10 +15,7 @@ export default { babel({ babelHelpers: 'bundled', exclude: ['node_modules/**'], - presets: [ - "@babel/preset-flow", - "@babel/preset-react" - ] + configFile: "../../babel.config.js" }) ], external: ['react', 'classnames'], diff --git a/packages/tabs/rollup.config.js b/packages/tabs/rollup.config.js index 16205ca3..3dc4393f 100644 --- a/packages/tabs/rollup.config.js +++ b/packages/tabs/rollup.config.js @@ -15,10 +15,7 @@ export default { babel({ babelHelpers: 'bundled', exclude: ['node_modules/**'], - presets: [ - "@babel/preset-flow", - "@babel/preset-react" - ] + configFile: "../../babel.config.js" }) ], external: ['react', 'classnames'], diff --git a/packages/taglist/rollup.config.js b/packages/taglist/rollup.config.js index 16205ca3..3dc4393f 100644 --- a/packages/taglist/rollup.config.js +++ b/packages/taglist/rollup.config.js @@ -15,10 +15,7 @@ export default { babel({ babelHelpers: 'bundled', exclude: ['node_modules/**'], - presets: [ - "@babel/preset-flow", - "@babel/preset-react" - ] + configFile: "../../babel.config.js" }) ], external: ['react', 'classnames'], diff --git a/packages/toggle/rollup.config.js b/packages/toggle/rollup.config.js index 16205ca3..3dc4393f 100644 --- a/packages/toggle/rollup.config.js +++ b/packages/toggle/rollup.config.js @@ -15,10 +15,7 @@ export default { babel({ babelHelpers: 'bundled', exclude: ['node_modules/**'], - presets: [ - "@babel/preset-flow", - "@babel/preset-react" - ] + configFile: "../../babel.config.js" }) ], external: ['react', 'classnames'], diff --git a/packages/user-menu/rollup.config.js b/packages/user-menu/rollup.config.js index 7e7f6e5e..d4c621ac 100644 --- a/packages/user-menu/rollup.config.js +++ b/packages/user-menu/rollup.config.js @@ -17,10 +17,7 @@ export default { babel({ babelHelpers: 'bundled', exclude: ['node_modules/**'], - presets: [ - "@babel/preset-flow", - "@babel/preset-react" - ] + configFile: "../../babel.config.js" }) ], external: ['react', 'react-dom', 'classnames'], diff --git a/webpack.config.js b/webpack.config.js index 45105e80..226ada5d 100644 --- a/webpack.config.js +++ b/webpack.config.js @@ -3,7 +3,7 @@ module.exports = { devtool: 'eval-cheap-source-map', module: { rules: [ - // Babel loader, will use your project’s fsdajkfdsak;ljfaklds;jfasd.js + // Babel loader, will use your project’s babel.config.js { test: /\.jsx?$/, exclude: /node_modules/,