From 00b3965fbaa0f0f3b52d47b8d608f5c90fc9e51a Mon Sep 17 00:00:00 2001 From: AlixH Date: Wed, 17 Nov 2021 15:35:58 +0100 Subject: [PATCH] Moved babel config plugins to test env --- babel.config.js | 8 ++++---- package.json | 4 +++- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/babel.config.js b/babel.config.js index 7e790c0bf..7fe378870 100644 --- a/babel.config.js +++ b/babel.config.js @@ -1,11 +1,11 @@ module.exports = { presets: ['module:metro-react-native-babel-preset'], - plugins: [ - "@babel/plugin-transform-runtime", - ["@babel/plugin-proposal-class-properties", { loose: true }], - ], env: { testing: { + plugins: [ + "@babel/plugin-transform-runtime", + ["@babel/plugin-proposal-class-properties", { loose: true }], + ], presets: [ [ "@babel/plugin-transform-runtime", { targets: { node: "current" }}], ], diff --git a/package.json b/package.json index 24dc913a3..f013c2e3b 100644 --- a/package.json +++ b/package.json @@ -59,7 +59,9 @@ "import-sort": "npx import-sort-cli --write '{src,__tests__,types}/**/*.ts{,x}' *.ts{,x}", "check:i18n": "cross-env TS_NODE_FILES=true ts-node-dev --project tsconfig-i18n.json --files test/I18nChecker.ts", "react-native:install": "npm install --force && npm clean-install && cd ios && pod install", - "clean:project": "rm -rf node_modules && cd android && ./gradlew clean && cd ../ios && xcodebuild clean && rm -rf ~/Library/Developer/Xcode/DerivedData && cd .. && npm start -- --reset-cache " + "clean:android": "cd android && ./gradlew clean && cd ..", + "clean:ios": "cd ios && xcodebuild clean && rm -rf ~/Library/Developer/Xcode/DerivedData && rm -rf Pods/ && pod install && cd ..", + "clean:project": "npm run clean:android && npm run clean:ios" }, "importSort": { ".js, .jsx, .es6, .es, .mjs": {