From a926a865c5314c61a7c125be7b5fd5b0ff3c0656 Mon Sep 17 00:00:00 2001 From: pdsuwwz Date: Thu, 28 Apr 2022 13:32:38 +0800 Subject: [PATCH] =?UTF-8?q?=F0=9F=9B=A0=20chore:=20refact=20monorepo=20for?= =?UTF-8?q?=20packages?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- {packages/backend => backend}/index.js | 1 - {packages/backend => backend}/package.json | 0 ...65\213\350\257\225\346\226\207\346\241\243.docx" | Bin ...1\2465\346\234\254\346\216\250\350\215\220.docx" | Bin {packages/frontend => frontend}/.gitignore | 0 {packages/frontend => frontend}/README.md | 0 {packages/frontend => frontend}/index.html | 0 {packages/frontend => frontend}/jsconfig.json | 0 {packages/frontend => frontend}/package.json | 0 {packages/frontend => frontend}/public/favicon.ico | Bin {packages/frontend => frontend}/src/App.vue | 0 {packages/frontend => frontend}/src/assets/logo.png | Bin .../src/components/HelloWorld.vue | 0 .../src/components/PreviewDemo.vue | 0 {packages/frontend => frontend}/src/main.js | 0 {packages/frontend => frontend}/vite.config.js | 0 pnpm-lock.yaml | 12 ++++++------ pnpm-workspace.yaml | 3 ++- vetur.config.js | 2 +- 19 files changed, 9 insertions(+), 9 deletions(-) rename {packages/backend => backend}/index.js (96%) rename {packages/backend => backend}/package.json (100%) rename "packages/doc/\346\265\213\350\257\225\346\226\207\346\241\243.docx" => "doc/\346\265\213\350\257\225\346\226\207\346\241\243.docx" (100%) rename "packages/doc/\350\201\214\345\234\272\346\226\260\344\272\272\345\277\205\350\257\273\344\271\2465\346\234\254\346\216\250\350\215\220.docx" => "doc/\350\201\214\345\234\272\346\226\260\344\272\272\345\277\205\350\257\273\344\271\2465\346\234\254\346\216\250\350\215\220.docx" (100%) rename {packages/frontend => frontend}/.gitignore (100%) rename {packages/frontend => frontend}/README.md (100%) rename {packages/frontend => frontend}/index.html (100%) rename {packages/frontend => frontend}/jsconfig.json (100%) rename {packages/frontend => frontend}/package.json (100%) rename {packages/frontend => frontend}/public/favicon.ico (100%) rename {packages/frontend => frontend}/src/App.vue (100%) rename {packages/frontend => frontend}/src/assets/logo.png (100%) rename {packages/frontend => frontend}/src/components/HelloWorld.vue (100%) rename {packages/frontend => frontend}/src/components/PreviewDemo.vue (100%) rename {packages/frontend => frontend}/src/main.js (100%) rename {packages/frontend => frontend}/vite.config.js (100%) diff --git a/packages/backend/index.js b/backend/index.js similarity index 96% rename from packages/backend/index.js rename to backend/index.js index 1795009..766e11a 100644 --- a/packages/backend/index.js +++ b/backend/index.js @@ -6,7 +6,6 @@ const app = express() const PORT = 4000 const docPath = path.resolve(process.cwd(), '..', 'doc') -console.log('docPath', docPath) const fileName = '职场新人必读书5本推荐.docx' diff --git a/packages/backend/package.json b/backend/package.json similarity index 100% rename from packages/backend/package.json rename to backend/package.json diff --git "a/packages/doc/\346\265\213\350\257\225\346\226\207\346\241\243.docx" "b/doc/\346\265\213\350\257\225\346\226\207\346\241\243.docx" similarity index 100% rename from "packages/doc/\346\265\213\350\257\225\346\226\207\346\241\243.docx" rename to "doc/\346\265\213\350\257\225\346\226\207\346\241\243.docx" diff --git "a/packages/doc/\350\201\214\345\234\272\346\226\260\344\272\272\345\277\205\350\257\273\344\271\2465\346\234\254\346\216\250\350\215\220.docx" "b/doc/\350\201\214\345\234\272\346\226\260\344\272\272\345\277\205\350\257\273\344\271\2465\346\234\254\346\216\250\350\215\220.docx" similarity index 100% rename from "packages/doc/\350\201\214\345\234\272\346\226\260\344\272\272\345\277\205\350\257\273\344\271\2465\346\234\254\346\216\250\350\215\220.docx" rename to "doc/\350\201\214\345\234\272\346\226\260\344\272\272\345\277\205\350\257\273\344\271\2465\346\234\254\346\216\250\350\215\220.docx" diff --git a/packages/frontend/.gitignore b/frontend/.gitignore similarity index 100% rename from packages/frontend/.gitignore rename to frontend/.gitignore diff --git a/packages/frontend/README.md b/frontend/README.md similarity index 100% rename from packages/frontend/README.md rename to frontend/README.md diff --git a/packages/frontend/index.html b/frontend/index.html similarity index 100% rename from packages/frontend/index.html rename to frontend/index.html diff --git a/packages/frontend/jsconfig.json b/frontend/jsconfig.json similarity index 100% rename from packages/frontend/jsconfig.json rename to frontend/jsconfig.json diff --git a/packages/frontend/package.json b/frontend/package.json similarity index 100% rename from packages/frontend/package.json rename to frontend/package.json diff --git a/packages/frontend/public/favicon.ico b/frontend/public/favicon.ico similarity index 100% rename from packages/frontend/public/favicon.ico rename to frontend/public/favicon.ico diff --git a/packages/frontend/src/App.vue b/frontend/src/App.vue similarity index 100% rename from packages/frontend/src/App.vue rename to frontend/src/App.vue diff --git a/packages/frontend/src/assets/logo.png b/frontend/src/assets/logo.png similarity index 100% rename from packages/frontend/src/assets/logo.png rename to frontend/src/assets/logo.png diff --git a/packages/frontend/src/components/HelloWorld.vue b/frontend/src/components/HelloWorld.vue similarity index 100% rename from packages/frontend/src/components/HelloWorld.vue rename to frontend/src/components/HelloWorld.vue diff --git a/packages/frontend/src/components/PreviewDemo.vue b/frontend/src/components/PreviewDemo.vue similarity index 100% rename from packages/frontend/src/components/PreviewDemo.vue rename to frontend/src/components/PreviewDemo.vue diff --git a/packages/frontend/src/main.js b/frontend/src/main.js similarity index 100% rename from packages/frontend/src/main.js rename to frontend/src/main.js diff --git a/packages/frontend/vite.config.js b/frontend/vite.config.js similarity index 100% rename from packages/frontend/vite.config.js rename to frontend/vite.config.js diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index e449d2b..d8b4348 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -24,13 +24,13 @@ importers: eslint-plugin-promise: 6.0.0_eslint@8.14.0 eslint-plugin-vue: 8.7.1_eslint@8.14.0 - packages/backend: + backend: specifiers: express: ^4.18.0 dependencies: express: 4.18.0 - packages/frontend: + frontend: specifiers: '@vitejs/plugin-vue': ^2.3.1 axios: ^0.27.2 @@ -1128,7 +1128,7 @@ packages: babel-plugin-polyfill-corejs2: 0.3.1_@babel+core@7.17.9 babel-plugin-polyfill-corejs3: 0.5.2_@babel+core@7.17.9 babel-plugin-polyfill-regenerator: 0.3.1_@babel+core@7.17.9 - core-js-compat: 3.22.2 + core-js-compat: 3.22.3 semver: 6.3.0 transitivePeerDependencies: - supports-color @@ -1479,7 +1479,7 @@ packages: dependencies: '@babel/core': 7.17.9 '@babel/helper-define-polyfill-provider': 0.3.1_@babel+core@7.17.9 - core-js-compat: 3.22.2 + core-js-compat: 3.22.3 transitivePeerDependencies: - supports-color dev: true @@ -1686,8 +1686,8 @@ packages: engines: {node: '>= 0.6'} dev: false - /core-js-compat/3.22.2: - resolution: {integrity: sha512-Fns9lU06ZJ07pdfmPMu7OnkIKGPKDzXKIiuGlSvHHapwqMUF2QnnsWwtueFZtSyZEilP0o6iUeHQwpn7LxtLUw==} + /core-js-compat/3.22.3: + resolution: {integrity: sha512-wliMbvPI2idgFWpFe7UEyHMvu6HWgW8WA+HnDRtgzoSDYvXFMpoGX1H3tPDDXrcfUSyXafCLDd7hOeMQHEZxGw==} dependencies: browserslist: 4.20.3 semver: 7.0.0 diff --git a/pnpm-workspace.yaml b/pnpm-workspace.yaml index 18ec407..aae3a8d 100644 --- a/pnpm-workspace.yaml +++ b/pnpm-workspace.yaml @@ -1,2 +1,3 @@ packages: - - 'packages/*' + - './frontend' + - './backend' diff --git a/vetur.config.js b/vetur.config.js index 1170efe..cf09c06 100644 --- a/vetur.config.js +++ b/vetur.config.js @@ -7,7 +7,7 @@ module.exports = { }, projects: [ { - root: './packages/frontend' + root: './frontend' } ] }