From ba2be09314d68b15d8b816da4e21f82fb7521290 Mon Sep 17 00:00:00 2001 From: luhc228 Date: Wed, 6 Dec 2023 10:56:38 +0800 Subject: [PATCH] feat: update template (#103) * feat: update template * chore: version and changelog --- packages/template-pkg-monorepo-node/CHANGELOG.md | 6 ++++++ packages/template-pkg-monorepo-node/package.json | 2 +- .../template/component/build.config.mts | 2 +- .../template/component/package.json | 2 +- packages/template-pkg-monorepo-react/CHANGELOG.md | 6 ++++++ packages/template-pkg-monorepo-react/package.json | 2 +- .../template/component/build.config.mts | 2 +- .../template/component/package.json | 2 +- .../component/packages/component-a/package.json | 3 --- .../component/packages/component-b/package.json | 3 --- .../component/packages/component-c/package.json | 3 --- packages/template-pkg-node/CHANGELOG.md | 4 ++++ packages/template-pkg-node/package.json | 2 +- .../template/component/package.json.ejs | 11 +---------- 14 files changed, 24 insertions(+), 26 deletions(-) diff --git a/packages/template-pkg-monorepo-node/CHANGELOG.md b/packages/template-pkg-monorepo-node/CHANGELOG.md index 914d94f..bf44198 100644 --- a/packages/template-pkg-monorepo-node/CHANGELOG.md +++ b/packages/template-pkg-monorepo-node/CHANGELOG.md @@ -1,5 +1,11 @@ # Changelog +## 1.0.13 + +- [fix] 修复生成文档目录时包含其他非 `docs` 目录下文档问题 +- [chore] 更新 packageManager +- [chore] 移除 publishConfig + ## 1.0.12 - [fix] some files are not published diff --git a/packages/template-pkg-monorepo-node/package.json b/packages/template-pkg-monorepo-node/package.json index deb388e..84e5cd4 100644 --- a/packages/template-pkg-monorepo-node/package.json +++ b/packages/template-pkg-monorepo-node/package.json @@ -1,6 +1,6 @@ { "name": "@ice/template-pkg-monorepo-node", - "version": "1.0.12", + "version": "1.0.13", "files": [ "template", "!template/component/.docusaurus", diff --git a/packages/template-pkg-monorepo-node/template/component/build.config.mts b/packages/template-pkg-monorepo-node/template/component/build.config.mts index 049ea25..3afe624 100644 --- a/packages/template-pkg-monorepo-node/template/component/build.config.mts +++ b/packages/template-pkg-monorepo-node/template/component/build.config.mts @@ -23,7 +23,7 @@ export default defineConfig({ // 2. Remove category link. const newSidebarItems = defaultSidebarItems.map(({ link, ...rest }: any) => ({ ...rest, - items: rest.items.map((item: any) => item.items).flat(), + items: rest.items.filter((item: any) => item.label === 'docs').map(item => item.items).flat(), })); return newSidebarItems; diff --git a/packages/template-pkg-monorepo-node/template/component/package.json b/packages/template-pkg-monorepo-node/template/component/package.json index daaaef4..b917a9d 100644 --- a/packages/template-pkg-monorepo-node/template/component/package.json +++ b/packages/template-pkg-monorepo-node/template/component/package.json @@ -29,5 +29,5 @@ "react-dom": "^18.2.0", "rimraf": "^4.1.2" }, - "packageManager": "pnpm@7.22.0" + "packageManager": "pnpm@8.6.0" } diff --git a/packages/template-pkg-monorepo-react/CHANGELOG.md b/packages/template-pkg-monorepo-react/CHANGELOG.md index d1774ab..1b994a8 100644 --- a/packages/template-pkg-monorepo-react/CHANGELOG.md +++ b/packages/template-pkg-monorepo-react/CHANGELOG.md @@ -1,5 +1,11 @@ # Changelog +## 1.0.11 + +- [fix] 修复生成文档目录时包含其他非 `docs` 目录下文档问题 +- [chore] 更新 packageManager +- [chore] 移除 publishConfig + ## 1.0.10 - [fix] some files are not published diff --git a/packages/template-pkg-monorepo-react/package.json b/packages/template-pkg-monorepo-react/package.json index 0ae319d..2944ca4 100644 --- a/packages/template-pkg-monorepo-react/package.json +++ b/packages/template-pkg-monorepo-react/package.json @@ -1,6 +1,6 @@ { "name": "@ice/template-pkg-monorepo-react", - "version": "1.0.10", + "version": "1.0.11", "files": [ "template", "!template/component/.docusaurus", diff --git a/packages/template-pkg-monorepo-react/template/component/build.config.mts b/packages/template-pkg-monorepo-react/template/component/build.config.mts index 049ea25..3afe624 100644 --- a/packages/template-pkg-monorepo-react/template/component/build.config.mts +++ b/packages/template-pkg-monorepo-react/template/component/build.config.mts @@ -23,7 +23,7 @@ export default defineConfig({ // 2. Remove category link. const newSidebarItems = defaultSidebarItems.map(({ link, ...rest }: any) => ({ ...rest, - items: rest.items.map((item: any) => item.items).flat(), + items: rest.items.filter((item: any) => item.label === 'docs').map(item => item.items).flat(), })); return newSidebarItems; diff --git a/packages/template-pkg-monorepo-react/template/component/package.json b/packages/template-pkg-monorepo-react/template/component/package.json index e515ef4..6ba02c4 100644 --- a/packages/template-pkg-monorepo-react/template/component/package.json +++ b/packages/template-pkg-monorepo-react/template/component/package.json @@ -33,5 +33,5 @@ "rimraf": "^4.1.2", "stylelint": "^15.0.0" }, - "packageManager": "pnpm@7.22.0" + "packageManager": "pnpm@8.6.0" } diff --git a/packages/template-pkg-monorepo-react/template/component/packages/component-a/package.json b/packages/template-pkg-monorepo-react/template/component/packages/component-a/package.json index 80a2c60..77d59a7 100644 --- a/packages/template-pkg-monorepo-react/template/component/packages/component-a/package.json +++ b/packages/template-pkg-monorepo-react/template/component/packages/component-a/package.json @@ -53,8 +53,5 @@ "peerDependencies": { "react": "^17 || ^18" }, - "publishConfig": { - "registry": "https://registry.npm.alibaba-inc.com" - }, "license": "MIT" } \ No newline at end of file diff --git a/packages/template-pkg-monorepo-react/template/component/packages/component-b/package.json b/packages/template-pkg-monorepo-react/template/component/packages/component-b/package.json index 6fa19ed..4febd0f 100644 --- a/packages/template-pkg-monorepo-react/template/component/packages/component-b/package.json +++ b/packages/template-pkg-monorepo-react/template/component/packages/component-b/package.json @@ -53,8 +53,5 @@ "peerDependencies": { "react": "^17 || ^18" }, - "publishConfig": { - "registry": "https://registry.npm.alibaba-inc.com" - }, "license": "MIT" } \ No newline at end of file diff --git a/packages/template-pkg-monorepo-react/template/component/packages/component-c/package.json b/packages/template-pkg-monorepo-react/template/component/packages/component-c/package.json index c7e87ff..f69e85a 100644 --- a/packages/template-pkg-monorepo-react/template/component/packages/component-c/package.json +++ b/packages/template-pkg-monorepo-react/template/component/packages/component-c/package.json @@ -53,8 +53,5 @@ "peerDependencies": { "react": "^17 || ^18" }, - "publishConfig": { - "registry": "https://registry.npm.alibaba-inc.com" - }, "license": "MIT" } \ No newline at end of file diff --git a/packages/template-pkg-node/CHANGELOG.md b/packages/template-pkg-node/CHANGELOG.md index eb3104f..29556a9 100644 --- a/packages/template-pkg-node/CHANGELOG.md +++ b/packages/template-pkg-node/CHANGELOG.md @@ -1,5 +1,9 @@ # Changelog +## 1.0.13 + +- [feat] 优化 `exports` 导出 + ## 1.0.12 - [fix] loss of dependencies(react & react-dom) diff --git a/packages/template-pkg-node/package.json b/packages/template-pkg-node/package.json index 83e2ce5..760d58b 100644 --- a/packages/template-pkg-node/package.json +++ b/packages/template-pkg-node/package.json @@ -1,6 +1,6 @@ { "name": "@ice/template-pkg-node", - "version": "1.0.12", + "version": "1.0.13", "files": [ "template" ], diff --git a/packages/template-pkg-node/template/component/package.json.ejs b/packages/template-pkg-node/template/component/package.json.ejs index 8eeb6b6..bcb68c1 100644 --- a/packages/template-pkg-node/template/component/package.json.ejs +++ b/packages/template-pkg-node/template/component/package.json.ejs @@ -13,16 +13,7 @@ "module": "es2017/index.js", "types": "es2017/index.d.ts", "exports": { - ".": { - "es2017": { - "types": "./es2017/index.d.ts", - "default": "./es2017/index.js" - }, - "default": { - "types": "./es2017/index.d.ts", - "default": "./es2017/index.js" - } - }, + ".": "./es2017/index.js", "./*": "./*" }, "sideEffects": false,