From 9f51f7bf357206adeefe91adc4081723fab95de1 Mon Sep 17 00:00:00 2001 From: ruan-cat <1219043956@qq.com> Date: Sun, 30 Jun 2024 17:16:50 +0800 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=8E=20ci:=20=E5=B0=9D=E8=AF=95?= =?UTF-8?q?=E5=AE=9E=E7=8E=B0=E6=96=87=E4=BB=B6=E7=A7=BB=E5=8A=A8=EF=BC=9B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- package.json | 3 +++ packages/monorepo-1/package.json | 2 +- packages/monorepo-3/package.json | 2 +- packages/monorepo-3/src/typedoc-api/typedoc-api.md | 12 ++++++++++++ packages/monorepo-4/package.json | 2 +- packages/monorepo-5/package.json | 2 +- packages/proj-2-vp2-custom-components/package.json | 2 +- 7 files changed, 20 insertions(+), 5 deletions(-) diff --git a/package.json b/package.json index afbfe35..47c9f27 100644 --- a/package.json +++ b/package.json @@ -45,6 +45,7 @@ "@types/node": "^20.14.8", "@vuepress/bundler-vite": "2.0.0-rc.14", "cpx2": "^7.0.1", + "cross-env": "^7.0.3", "eslint": "^9.5.0", "eslint-config-flat-gitignore": "^0.1.5", "eslint-config-prettier": "^9.1.0", @@ -53,8 +54,10 @@ "eslint-plugin-jsdoc": "^48.4.0", "eslint-plugin-prettier": "^5.1.3", "markdown-it": "^14.1.0", + "mkdirp": "^3.0.1", "prettier": "^3.3.2", "rimraf": "^5.0.7", + "shx": "^0.3.4", "turbo": "^2.0.5", "typescript": "^5.5.2", "vercel": "^34.2.7", diff --git a/packages/monorepo-1/package.json b/packages/monorepo-1/package.json index 88390ab..0647633 100644 --- a/packages/monorepo-1/package.json +++ b/packages/monorepo-1/package.json @@ -9,7 +9,7 @@ "docs:clean-dev": "vuepress-vite dev src --clean-cache", "docs:dev": "vuepress-vite dev src", "docs:update-package": "pnpm dlx vp-update", - "copy-dist": "rm -rf .vercel/output/static/* & cp -r src/.vuepress/dist/* .vercel/output/static/ & ls .vercel/output/static/", + "copy-dist": "rimraf .vercel/output/static && mkdirp .vercel/output/static && cpx \"src/.vuepress/dist/**/*\" .vercel/output/static && shx ls .vercel/output/static", "clear": "rimraf dist && rimraf .turbo && rimraf .vercel" }, "devDependencies": { diff --git a/packages/monorepo-3/package.json b/packages/monorepo-3/package.json index a7a70e8..5177d03 100644 --- a/packages/monorepo-3/package.json +++ b/packages/monorepo-3/package.json @@ -9,7 +9,7 @@ "docs:clean-dev": "vuepress-vite dev src --clean-cache", "docs:dev": "vuepress-vite dev src", "docs:update-package": "pnpm dlx vp-update", - "copy-dist": "rm -rf .vercel/output/static/* & cp -r src/.vuepress/dist/* .vercel/output/static/ & ls .vercel/output/static/", + "copy-dist": "rimraf .vercel/output/static && mkdirp .vercel/output/static && cpx \"src/.vuepress/dist/**/*\" .vercel/output/static && shx ls .vercel/output/static", "clear": "rimraf dist && rimraf .turbo && rimraf .vercel" }, "devDependencies": { diff --git a/packages/monorepo-3/src/typedoc-api/typedoc-api.md b/packages/monorepo-3/src/typedoc-api/typedoc-api.md index 8810e5c..1a77e65 100644 --- a/packages/monorepo-3/src/typedoc-api/typedoc-api.md +++ b/packages/monorepo-3/src/typedoc-api/typedoc-api.md @@ -1,3 +1,15 @@ # typedoc-api 你好,这里是文档。自动生成的文档。 + +请使用 node包 rimraf 和 cpx 编写一段命令,完成以下需求: + +1. 清空文件夹 `.vercel/output/static` +2. 文件内容移动 `src/.vuepress/dist` 到 `.vercel/output/static` +3. 输出列表 `.vercel/output/static` + +注意事项如下: + +1. 这段命令最终会运行到github action内,请确保该命令可以在window系统和linux系统内均可运行。 +2. 这段命令要封装在package.json的copy-dist命令内。 +3. 如果 `.vercel/output/static` 不存在,请新建文件夹,并确保上述命令不会出错。 diff --git a/packages/monorepo-4/package.json b/packages/monorepo-4/package.json index d73c3d2..8624d1d 100644 --- a/packages/monorepo-4/package.json +++ b/packages/monorepo-4/package.json @@ -9,7 +9,7 @@ "docs:clean-dev": "vuepress-vite dev src --clean-cache", "docs:dev": "vuepress-vite dev src", "docs:update-package": "pnpm dlx vp-update", - "copy-dist": "rm -rf .vercel/output/static/* & cp -r src/.vuepress/dist/* .vercel/output/static/ & ls .vercel/output/static/", + "copy-dist": "rimraf .vercel/output/static && mkdirp .vercel/output/static && cpx \"src/.vuepress/dist/**/*\" .vercel/output/static && shx ls .vercel/output/static", "clear": "rimraf dist && rimraf .turbo && rimraf .vercel" } } \ No newline at end of file diff --git a/packages/monorepo-5/package.json b/packages/monorepo-5/package.json index 87fb6ba..c62e0b7 100644 --- a/packages/monorepo-5/package.json +++ b/packages/monorepo-5/package.json @@ -9,7 +9,7 @@ "docs:clean-dev": "vuepress-vite dev src --clean-cache", "docs:dev": "vuepress-vite dev src", "docs:update-package": "pnpm dlx vp-update", - "copy-dist": "rm -rf .vercel/output/static/* & cp -r src/.vuepress/dist/* .vercel/output/static/ & ls .vercel/output/static/", + "copy-dist": "rimraf .vercel/output/static && mkdirp .vercel/output/static && cpx \"src/.vuepress/dist/**/*\" .vercel/output/static && shx ls .vercel/output/static", "clear": "rimraf dist && rimraf .turbo && rimraf .vercel" } } \ No newline at end of file diff --git a/packages/proj-2-vp2-custom-components/package.json b/packages/proj-2-vp2-custom-components/package.json index dbc3ab3..886b073 100644 --- a/packages/proj-2-vp2-custom-components/package.json +++ b/packages/proj-2-vp2-custom-components/package.json @@ -9,7 +9,7 @@ "docs:clean-dev": "vuepress-vite dev src --clean-cache", "docs:dev": "vuepress-vite dev src", "docs:update-package": "pnpm dlx vp-update", - "copy-dist": "rm -rf .vercel/output/static/* & cp -r src/.vuepress/dist/* .vercel/output/static/ & ls .vercel/output/static/", + "copy-dist": "rimraf .vercel/output/static && mkdirp .vercel/output/static && cpx \"src/.vuepress/dist/**/*\" .vercel/output/static && shx ls .vercel/output/static", "clear": "rimraf dist && rimraf .turbo && rimraf .vercel" } } \ No newline at end of file