Skip to content

Commit 0f43647

Browse files
zzcrkagol
authored andcommitted
chore(internals): remove the rich-text-editor component from the main entry (#2768)
1 parent cf0d8aa commit 0f43647

File tree

5 files changed

+17
-20
lines changed

5 files changed

+17
-20
lines changed

internals/cli/src/shared/config.ts

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
import rich_text_editor_pkg from '../../../../packages/vue/src/rich-text-editor/package.json'
2-
31
const EXTENERAL = [
42
'vue',
53
'axios',
@@ -12,10 +10,11 @@ const EXTENERAL = [
1210
'shepherd.js',
1311
'./label-wrap',
1412
'./tall-storage.vue',
15-
...Object.keys(rich_text_editor_pkg.peerDependencies)
13+
'highlight.js',
14+
'lowlight'
1615
]
1716
const external = (deps) => {
18-
return EXTENERAL.includes(deps) || /^@opentiny[\\/]|@originjs|echarts|cropperjs|@better-scroll/.test(deps)
17+
return EXTENERAL.includes(deps) || /^@opentiny[\\/]|@originjs|@tiptap|echarts|cropperjs|@better-scroll/.test(deps)
1918
}
2019

2120
export { external }

internals/cli/src/shared/module-utils.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ const moduleMap = require(pathFromWorkspaceRoot('packages/modules.json'))
1414
type mode = 'pc' | 'mobile' | 'mobile-first'
1515

1616
// 需要在入口文件中排除的组件,比如:富文本
17-
export const excludeComponents = ['RichText']
17+
export const excludeComponents = ['RichText', 'RichTextEditor']
1818

1919
export interface Module {
2020
/** 源码路径,如 vue/src/button/index.ts */

packages/modules.json

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -918,17 +918,17 @@
918918
"type": "component",
919919
"exclude": false,
920920
"mode": [
921-
"pc",
922-
"mobile-first"
921+
"mobile-first",
922+
"pc"
923923
]
924924
},
925-
"DividerPc": {
926-
"path": "vue/src/divider/src/pc.vue",
925+
"DividerMobileFirst": {
926+
"path": "vue/src/divider/src/mobile-first.vue",
927927
"type": "template",
928928
"exclude": false
929929
},
930-
"DividerMobileFirst": {
931-
"path": "vue/src/divider/src/mobile-first.vue",
930+
"DividerPc": {
931+
"path": "vue/src/divider/src/pc.vue",
932932
"type": "template",
933933
"exclude": false
934934
},

packages/vue/package.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "@opentiny/vue",
33
"private": true,
4-
"version": "3.21.0",
4+
"version": "3.21.1",
55
"description": "An enterprise-class UI component library, support both Vue.js 2 and Vue.js 3, as well as PC and mobile.",
66
"homepage": "https://opentiny.design/tiny-vue",
77
"keywords": [
@@ -196,7 +196,6 @@
196196
"@opentiny/vue-rate": "workspace:~",
197197
"@opentiny/vue-record": "workspace:~",
198198
"@opentiny/vue-recycle-scroller": "workspace:~",
199-
"@opentiny/vue-rich-text-editor": "workspace:~",
200199
"@opentiny/vue-river": "workspace:~",
201200
"@opentiny/vue-roles": "workspace:~",
202201
"@opentiny/vue-row": "workspace:~",

packages/vue/src/rich-text-editor/package.json

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -15,15 +15,10 @@
1515
"@opentiny/vue-common": "workspace:~",
1616
"@opentiny/vue-renderless": "workspace:~",
1717
"@opentiny/vue-theme": "workspace:~",
18-
"@opentiny/vue-icon": "workspace:~"
19-
},
20-
"devDependencies": {
21-
"@opentiny-internal/vue-test-utils": "workspace:*",
22-
"vitest": "catalog:"
23-
},
24-
"peerDependencies": {
18+
"@opentiny/vue-icon": "workspace:~",
2519
"@tiptap/core": "~2.1.16",
2620
"@tiptap/extension-code-block-lowlight": "~2.1.16",
21+
"@tiptap/extension-code-block": "~2.1.16",
2722
"@tiptap/extension-collaboration": "~2.1.16",
2823
"@tiptap/extension-color": "~2.1.16",
2924
"@tiptap/extension-highlight": "~2.1.16",
@@ -48,5 +43,9 @@
4843
"@tiptap/vue-3": "~2.1.16",
4944
"highlight.js": "^11.8.0",
5045
"lowlight": "^2.9.0"
46+
},
47+
"devDependencies": {
48+
"@opentiny-internal/vue-test-utils": "workspace:*",
49+
"vitest": "catalog:"
5150
}
5251
}

0 commit comments

Comments
 (0)