Skip to content

Commit

Permalink
chore(internals): remove the rich-text-editor component from the main…
Browse files Browse the repository at this point in the history
… entry
  • Loading branch information
zzcr committed Jan 9, 2025
1 parent 4ebed69 commit 2c56e5f
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 20 deletions.
7 changes: 3 additions & 4 deletions internals/cli/src/shared/config.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
import rich_text_editor_pkg from '../../../../packages/vue/src/rich-text-editor/package.json'

const EXTENERAL = [
'vue',
'axios',
Expand All @@ -12,10 +10,11 @@ const EXTENERAL = [
'shepherd.js',
'./label-wrap',
'./tall-storage.vue',
...Object.keys(rich_text_editor_pkg.peerDependencies)
'highlight.js',
'lowlight'
]
const external = (deps) => {
return EXTENERAL.includes(deps) || /^@opentiny[\\/]|@originjs|echarts|cropperjs|@better-scroll/.test(deps)
return EXTENERAL.includes(deps) || /^@opentiny[\\/]|@originjs|@tiptap|echarts|cropperjs|@better-scroll/.test(deps)
}

export { external }
2 changes: 1 addition & 1 deletion internals/cli/src/shared/module-utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ const moduleMap = require(pathFromWorkspaceRoot('packages/modules.json'))
type mode = 'pc' | 'mobile' | 'mobile-first'

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

export interface Module {
/** 源码路径,如 vue/src/button/index.ts */
Expand Down
12 changes: 6 additions & 6 deletions packages/modules.json
Original file line number Diff line number Diff line change
Expand Up @@ -918,17 +918,17 @@
"type": "component",
"exclude": false,
"mode": [
"pc",
"mobile-first"
"mobile-first",
"pc"
]
},
"DividerPc": {
"path": "vue/src/divider/src/pc.vue",
"DividerMobileFirst": {
"path": "vue/src/divider/src/mobile-first.vue",
"type": "template",
"exclude": false
},
"DividerMobileFirst": {
"path": "vue/src/divider/src/mobile-first.vue",
"DividerPc": {
"path": "vue/src/divider/src/pc.vue",
"type": "template",
"exclude": false
},
Expand Down
3 changes: 1 addition & 2 deletions packages/vue/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@opentiny/vue",
"private": true,
"version": "3.21.0",
"version": "3.21.1",
"description": "An enterprise-class UI component library, support both Vue.js 2 and Vue.js 3, as well as PC and mobile.",
"homepage": "https://opentiny.design/tiny-vue",
"keywords": [
Expand Down Expand Up @@ -196,7 +196,6 @@
"@opentiny/vue-rate": "workspace:~",
"@opentiny/vue-record": "workspace:~",
"@opentiny/vue-recycle-scroller": "workspace:~",
"@opentiny/vue-rich-text-editor": "workspace:~",
"@opentiny/vue-river": "workspace:~",
"@opentiny/vue-roles": "workspace:~",
"@opentiny/vue-row": "workspace:~",
Expand Down
13 changes: 6 additions & 7 deletions packages/vue/src/rich-text-editor/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,15 +15,10 @@
"@opentiny/vue-common": "workspace:~",
"@opentiny/vue-renderless": "workspace:~",
"@opentiny/vue-theme": "workspace:~",
"@opentiny/vue-icon": "workspace:~"
},
"devDependencies": {
"@opentiny-internal/vue-test-utils": "workspace:*",
"vitest": "catalog:"
},
"peerDependencies": {
"@opentiny/vue-icon": "workspace:~",
"@tiptap/core": "~2.1.16",
"@tiptap/extension-code-block-lowlight": "~2.1.16",
"@tiptap/extension-code-block": "~2.1.16",
"@tiptap/extension-collaboration": "~2.1.16",
"@tiptap/extension-color": "~2.1.16",
"@tiptap/extension-highlight": "~2.1.16",
Expand All @@ -48,5 +43,9 @@
"@tiptap/vue-3": "~2.1.16",
"highlight.js": "^11.8.0",
"lowlight": "^2.9.0"
},
"devDependencies": {
"@opentiny-internal/vue-test-utils": "workspace:*",
"vitest": "catalog:"
}
}

0 comments on commit 2c56e5f

Please sign in to comment.