From d655988c2be2d195eac307992cd5c6fd6d3333be Mon Sep 17 00:00:00 2001 From: Evan You Date: Fri, 6 May 2022 14:58:45 +0800 Subject: [PATCH] fix build copy --- package.json | 2 +- scripts/copyClient.js | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index 5f85bc1afadf..0c7ce4d31106 100644 --- a/package.json +++ b/package.json @@ -37,7 +37,7 @@ "docs": "run-p dev docs-dev", "docs-dev": "node ./bin/vitepress dev docs", "docs-debug": "node --inspect-brk ./bin/vitepress dev docs", - "docs-build": "npm run build && node ./bin/vitepress build docs", + "docs-build": "run-s build docs-build-only", "docs-build-only": "node ./bin/vitepress build docs", "docs-serve": "node ./bin/vitepress serve docs", "ci-docs": "run-s build docs-build" diff --git a/scripts/copyClient.js b/scripts/copyClient.js index 5f6e0f7cf55c..20553aead11e 100644 --- a/scripts/copyClient.js +++ b/scripts/copyClient.js @@ -5,6 +5,7 @@ function toDest(file) { return file.replace(/^src\//, 'dist/') } -glob.sync('src/client/**/!(*.ts|tsconfig.json)').forEach((file) => { +glob.sync('src/client/**').forEach((file) => { + if (/(\.ts|tsconfig\.json)$/.test(file)) return fs.copy(file, toDest(file)) })