From 17c563ba1376e8e5ef063616965964ef75d5474e Mon Sep 17 00:00:00 2001 From: afc163 Date: Thu, 27 Oct 2022 18:23:59 +0800 Subject: [PATCH 1/2] chore: father 4 and rc-test --- .fatherrc.js | 14 +++++--------- package.json | 11 ++++++----- tsconfig.json | 16 +++++++++++----- 3 files changed, 22 insertions(+), 19 deletions(-) diff --git a/.fatherrc.js b/.fatherrc.js index 912aa0aa..4ddbafd1 100644 --- a/.fatherrc.js +++ b/.fatherrc.js @@ -1,9 +1,5 @@ -export default { - cjs: 'babel', - esm: { type: 'babel', importLibToEs: true }, - preCommit: { - eslint: true, - prettier: true, - }, - runtimeHelpers: true, -}; +import { defineConfig } from 'father'; + +export default defineConfig({ + plugins: ['@rc-component/father-plugin'], +}); \ No newline at end of file diff --git a/package.json b/package.json index dfa3f0de..9a6512ad 100644 --- a/package.json +++ b/package.json @@ -40,7 +40,7 @@ "prepublishOnly": "npm run compile && np --yolo --no-publish", "postpublish": "tnpm sync rc-menu", "start": "dumi dev", - "test": "father test" + "test": "rc-test" }, "dependencies": { "@babel/runtime": "^7.10.1", @@ -61,18 +61,19 @@ "cross-env": "^7.0.0", "dumi": "^1.1.0", "eslint": "^7.0.0", - "father": "^2.22.0", - "father-build": "^1.18.6", + "father": "^4.0.0", "gh-pages": "^3.1.0", "less": "^3.10.3", "np": "^6.0.0", + "rc-test": "^7.0.14", "react": "^18.0.0", "react-dom": "^18.0.0", "regenerator-runtime": "^0.13.7", - "typescript": "^4.0.5" + "typescript": "^4.0.5", + "@rc-component/father-plugin": "^1.0.0" }, "peerDependencies": { "react": ">=16.9.0", "react-dom": ">=16.9.0" } -} +} \ No newline at end of file diff --git a/tsconfig.json b/tsconfig.json index 80235546..2321b878 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -3,14 +3,20 @@ "target": "esnext", "moduleResolution": "node", "baseUrl": "./", - "jsx": "preserve", + "jsx": "react", "declaration": true, "skipLibCheck": true, "esModuleInterop": true, "paths": { - "@/*": ["src/*"], - "@@/*": ["src/.umi/*"], - "rc-menu": ["src/index.tsx"] + "@/*": [ + "src/*" + ], + "@@/*": [ + "src/.umi/*" + ], + "rc-menu": [ + "src/index.tsx" + ] } } -} +} \ No newline at end of file From e9d9ba2f1a4ce07a292d81bcab583bd00ec1a0ec Mon Sep 17 00:00:00 2001 From: afc163 Date: Thu, 27 Oct 2022 18:28:50 +0800 Subject: [PATCH 2/2] Update package.json --- package.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index 9a6512ad..dd6a6e09 100644 --- a/package.json +++ b/package.json @@ -32,7 +32,7 @@ ], "scripts": { "compile": "father build && lessc assets/index.less assets/index.css", - "coverage": "father test --coverage", + "coverage": "rc-test --coverage", "docs:build": "dumi build", "docs:deploy": "gh-pages -d .doc", "lint": "eslint src/ --ext .tsx,.ts,.jsx,.js", @@ -76,4 +76,4 @@ "react": ">=16.9.0", "react-dom": ">=16.9.0" } -} \ No newline at end of file +}