Skip to content

Commit

Permalink
fix: 🐛 build scripts
Browse files Browse the repository at this point in the history
  • Loading branch information
charlzyx committed Jan 15, 2024
1 parent dd09e48 commit 37645b5
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 43 deletions.
13 changes: 7 additions & 6 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
{
"name": "@proformily/antd-v5",
"name": "@proformily/antd",
"version": "1.0.0",
"private": true,
"scripts": {
"d4": "node scripts/switch.js antd dev && rspress dev",
"d5": "node scripts/switch.js antd-v5 dev && rspress dev",
"build:docs": "rspress build",
"v4": "node scripts/switch.js antd dev && rspress dev",
"v5": "node scripts/switch.js antd-v5 dev && rspress dev",
"build:docs:v4": "node scripts/switch.js antd && rspress build",
"build:docs:v5": "node scripts/switch.js antd-v5 && rspress build",
"preview": "rspress preview"
},
"dependencies": {
Expand All @@ -19,8 +20,8 @@
"react": "^18.2.0",
"react-dom": "^18.2.0",
"react-resizable": "^3.0.5",
"@formily/antd-v5": "^1.*.*",
"antd": "^5.*.*"
"@formily/antd": "^2.*.*",
"antd": "^4.*.*"
},
"devDependencies": {
"@biomejs/biome": "^1.5.0",
Expand Down
28 changes: 0 additions & 28 deletions scripts/read.js

This file was deleted.

16 changes: 8 additions & 8 deletions scripts/switch.js
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,8 @@ if (mode === "dev") {
} else {
execSync(`rm -rf ${shadow}`);
execSync(`cp -R ${ui} ${shadow}`);
rmrf.sync(path.resolve(__dirname, "../node_modules"));
rmrf.sync(path.resolve(__dirname, "../doc_build"));
}
const pkgPath = path.resolve(__dirname, "../package.json");
const pkg = JSON.parse(fs.readFileSync(pkgPath));
Expand All @@ -101,14 +103,12 @@ const deps = {

// sed -i 's/@proformily\/antd/@proformily\/antd-v5/g' *

if (!pkg.dependencies[`@formily/${adaptor}`]) {
pkg.dependencies = {
...deps,
...adaptorPkg.dependencies,
};
fs.writeFileSync(pkgPath, JSON.stringify(pkg, null, 2), "utf-8");
rmrf.sync(path.resolve(__dirname, "../node_modules"));
}
pkg.dependencies = {
...deps,
...adaptorPkg.dependencies,
};
fs.writeFileSync(pkgPath, JSON.stringify(pkg, null, 2), "utf-8");
rmrf.sync(path.resolve(__dirname, "../node_modules"));

rmrf.sync(path.resolve(__dirname, "../doc_build"));
execSync("bun i");
Expand Down
1 change: 0 additions & 1 deletion src/adaptor

This file was deleted.

0 comments on commit 37645b5

Please sign in to comment.