From 71bbf49a36e81f45e00260bed251b5ec40d6f1c5 Mon Sep 17 00:00:00 2001 From: gimmyhehe <975402925@qq.com> Date: Mon, 21 Oct 2024 16:51:41 +0800 Subject: [PATCH] =?UTF-8?q?docs:=20=E5=88=A0=E9=99=A4smb=E9=85=8D=E7=BD=AE?= =?UTF-8?q?=E4=BB=A5=E5=8F=8A=E7=9B=B8=E5=85=B3=E4=BE=9D=E8=B5=96=20(#2332?= =?UTF-8?q?)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- examples/docs/newsrc/pc.vue | 6 ++--- examples/docs/package.json | 1 - examples/sites/package.json | 1 - examples/sites/playground/App.vue | 17 +++++++------- examples/sites/src/tools/useTheme.js | 9 ++++---- examples/vue2/package.json | 23 +++++++++---------- examples/vue3/package.json | 1 - internals/cli/src/commands/build/build-ui.ts | 12 ++-------- .../src/commands/create/commonMapping.json | 7 +----- packages/design/smb/index.ts | 7 ------ packages/design/smb/package.json | 11 --------- 11 files changed, 28 insertions(+), 67 deletions(-) delete mode 100644 packages/design/smb/index.ts delete mode 100644 packages/design/smb/package.json diff --git a/examples/docs/newsrc/pc.vue b/examples/docs/newsrc/pc.vue index 335e78b74..87e9c69a1 100644 --- a/examples/docs/newsrc/pc.vue +++ b/examples/docs/newsrc/pc.vue @@ -157,7 +157,6 @@ import { } from '@opentiny/vue' import { iconStarActive, iconSelect } from '@opentiny/vue-icon' import Loading from '@opentiny/vue-loading' -import designSmbConfig from '@opentiny/vue-design-smb' import designSaasConfig from '@opentiny/vue-design-saas' import { menuData, demoStr, demoVue, mds, demos } from './resourcePc.js' import { useTheme, useModeCtx } from './uses' @@ -263,10 +262,9 @@ export default { modeFn.pushToUrl() } - // 默认全部使用designSmbConfig,后续验收完毕再调整 const designConfigMap = { - 'tiny-smb-theme': designSmbConfig, - 'tiny-aurora-theme': designSmbConfig + 'tiny-smb-theme': {}, + 'tiny-aurora-theme': {} } const lastThemeKey = localStorage.getItem('tinyThemeToolkey') diff --git a/examples/docs/package.json b/examples/docs/package.json index 539f42937..ea29be8f0 100644 --- a/examples/docs/package.json +++ b/examples/docs/package.json @@ -14,7 +14,6 @@ "@opentiny/vue-common": "workspace:~", "@opentiny/vue-design-aurora": "workspace:~", "@opentiny/vue-design-saas": "workspace:~", - "@opentiny/vue-design-smb": "workspace:~", "@opentiny/vue-icon": "workspace:~", "@opentiny/vue-theme-mobile": "workspace:~", "@opentiny/vue-theme-saas": "workspace:~", diff --git a/examples/sites/package.json b/examples/sites/package.json index 5153b2b1a..e635be75a 100644 --- a/examples/sites/package.json +++ b/examples/sites/package.json @@ -25,7 +25,6 @@ "@opentiny/vue-common": "workspace:~", "@opentiny/vue-design-aurora": "workspace:~", "@opentiny/vue-design-saas": "workspace:~", - "@opentiny/vue-design-smb": "workspace:~", "@opentiny/vue-directive": "workspace:~", "@opentiny/vue-hooks": "workspace:~", "@opentiny/vue-icon": "workspace:~", diff --git a/examples/sites/playground/App.vue b/examples/sites/playground/App.vue index 21af5cc7a..1d2a7faf4 100644 --- a/examples/sites/playground/App.vue +++ b/examples/sites/playground/App.vue @@ -71,9 +71,10 @@ const createImportMap = (version) => { '@opentiny/vue-renderless/': `${cdnHost}/@opentiny/vue-renderless${versionDelimiter}${version}/${fileDelimiter}`, 'sortablejs': `${cdnHost}/sortablejs${versionDelimiter}1.15.0/${fileDelimiter}modular/sortable.esm.js` } - if (['aurora', 'smb', 'saas'].includes(tinyTheme)) { - imports[`@opentiny/vue-design-${tinyTheme}`] = - `${cdnHost}/@opentiny/vue-design-${tinyTheme}${versionDelimiter}${version}/${fileDelimiter}index.js` + if (['aurora', 'saas'].includes(tinyTheme)) { + imports[ + `@opentiny/vue-design-${tinyTheme}` + ] = `${cdnHost}/@opentiny/vue-design-${tinyTheme}${versionDelimiter}${version}/${fileDelimiter}index.js` } if (isSaas) { imports['@opentiny/vue-icon'] = `${getRuntime(version)}tiny-vue-icon-saas.mjs` @@ -88,12 +89,11 @@ const getTinyTheme = (version) => { return `${getRuntime(version)}tailwind.css` } let theme = tinyTheme - if (!['smb', 'default', 'aurora', 'saas'].includes(theme)) { + if (!['aurora', 'saas'].includes(theme)) { theme = 'default' } const tinyThemeMap = { default: `${cdnHost}/@opentiny/vue-theme${versionDelimiter}${version}/${fileDelimiter}index.css`, - smb: `${cdnHost}/@opentiny/vue-theme${versionDelimiter}${version}/${fileDelimiter}index.css`, aurora: `${cdnHost}/@opentiny/vue-theme${versionDelimiter}${version}/${fileDelimiter}index.css`, saas: `${cdnHost}/@opentiny/vue-theme-saas${versionDelimiter}${version}/${fileDelimiter}index.css` } @@ -132,8 +132,7 @@ const state = reactive({ const designThemeMap = { aurora: 'tinyAuroraTheme', - infinity: 'tinyInfinityTheme', - smb: 'tinySmbTheme' + infinity: 'tinyInfinityTheme' } function setTinyDesign() { @@ -144,13 +143,13 @@ function setTinyDesign() { useCode += 'app.provide("TinyMode", "mobile-first");\n' } - if (['aurora', 'smb', 'saas'].includes(tinyTheme)) { + if (['aurora', 'saas'].includes(tinyTheme)) { importCode += `import designConfig from '@opentiny/vue-design-${tinyTheme}'; import { design } from '@opentiny/vue-common';\n` useCode += 'app.provide(design.configKey, designConfig);\n' } - if (['aurora', 'infinity', 'smb'].includes(tinyTheme)) { + if (['aurora', 'infinity'].includes(tinyTheme)) { const designTheme = designThemeMap[tinyTheme] importCode += `import TinyThemeTool from '@opentiny/vue-theme/theme-tool'; import { ${designTheme} } from '@opentiny/vue-theme/theme';\n` diff --git a/examples/sites/src/tools/useTheme.js b/examples/sites/src/tools/useTheme.js index ef0c5741d..c04c37e96 100644 --- a/examples/sites/src/tools/useTheme.js +++ b/examples/sites/src/tools/useTheme.js @@ -1,7 +1,6 @@ import { watch, computed } from 'vue' import TinyThemeTool from '@opentiny/vue-theme/theme-tool' import { hooks } from '@opentiny/vue-common' -import designSmbConfig from '@opentiny/vue-design-smb' import designSaasConfig from '@opentiny/vue-design-saas' import { router } from '@/router' import { appData } from './appData' @@ -67,10 +66,10 @@ const themeData = [ ] const designConfigMap = { - [DEFAULT_THEME]: designSmbConfig, - [INFINITY_THEME]: designSmbConfig, - [AURORA_THEME]: designSmbConfig, - [SMB_THEME]: designSmbConfig + [DEFAULT_THEME]: {}, + [INFINITY_THEME]: {}, + [AURORA_THEME]: {}, + [SMB_THEME]: {} } const theme = new TinyThemeTool() diff --git a/examples/vue2/package.json b/examples/vue2/package.json index b8b8b985a..fab6048e4 100644 --- a/examples/vue2/package.json +++ b/examples/vue2/package.json @@ -1,8 +1,8 @@ { "name": "vue2-example", "type": "module", - "private": true, "version": "0.1.6-mf.0", + "private": true, "files": [ "*" ], @@ -23,21 +23,27 @@ "@opentiny/vue-locale": "workspace:~", "@opentiny/vue-renderless": "workspace:~", "@opentiny/vue-theme": "workspace:~", - "@opentiny/vue-theme-saas": "workspace:~", "@opentiny/vue-theme-mobile": "workspace:~", + "@opentiny/vue-theme-saas": "workspace:~", "@opentiny/vue-vite-import": "workspace:~", - "@opentiny/vue-design-smb": "workspace:~", "@playwright/test": "~1.42.0", + "@tiptap/vue-2": "^2.1.0", + "@unocss/core": "^0.48.0", + "@unocss/preset-icons": "^0.61.9", + "@unocss/transformer-directives": "^0.48.0", "@vitest/ui": "^0.31.0", "@vue/babel-helper-vue-jsx-merge-props": "^1.4.0", "@vue/composition-api": "1.7.2", "@vue/runtime-dom": "^3.2.31", "@vue/test-utils": "^1.3.3", + "js-sha256": "^0.9.0", "jsdom": "^21.0.0", + "onigasm": "^2.2.5", "postcss": "^8.4.16", "tailwindcss": "^3.2.4", "tailwindcss-vite-plugin": "^0.0.3", "typescript": "^5.0.0", + "unocss": "^0.61.9", "unplugin-vue2-script-setup": "^0.11.3", "vite": "^4.3.8", "vite-plugin-checker": "^0.5.2", @@ -51,13 +57,6 @@ "vue": "2.6.14", "vue-i18n": "^8.9.0", "vue-template-compiler": "2.6.14", - "vue-tsc": "^1.0.16", - "js-sha256": "^0.9.0", - "onigasm": "^2.2.5", - "@tiptap/vue-2": "^2.1.0", - "unocss": "^0.61.9", - "@unocss/core": "^0.48.0", - "@unocss/preset-icons": "^0.61.9", - "@unocss/transformer-directives": "^0.48.0" + "vue-tsc": "^1.0.16" } -} \ No newline at end of file +} diff --git a/examples/vue3/package.json b/examples/vue3/package.json index 8b2df1f55..1ea2ef0a2 100644 --- a/examples/vue3/package.json +++ b/examples/vue3/package.json @@ -22,7 +22,6 @@ "@opentiny/vue": "workspace:~", "@opentiny/vue-common": "workspace:~", "@opentiny/vue-design-aurora": "workspace:~", - "@opentiny/vue-design-smb": "workspace:~", "@opentiny/vue-icon": "workspace:~", "@opentiny/vue-locale": "workspace:~", "@opentiny/vue-renderless": "workspace:~", diff --git a/internals/cli/src/commands/build/build-ui.ts b/internals/cli/src/commands/build/build-ui.ts index a30175cda..07cc2da17 100644 --- a/internals/cli/src/commands/build/build-ui.ts +++ b/internals/cli/src/commands/build/build-ui.ts @@ -200,15 +200,7 @@ export const getBaseConfig = ({ vueVersion, dtsInclude, dts, buildTarget, isRunt dependencies['@vue/composition-api'] = '1.7.2' } - const matchList = [ - 'vue-icon', - 'vue-icon-saas', - 'vue', - 'design/smb', - 'design/aurora', - 'design/saas', - 'vue-directive' - ] + const matchList = ['vue-icon', 'vue-icon-saas', 'vue', 'design/aurora', 'design/saas', 'vue-directive'] // 如果是主入口、svg图标或者主题规范包则直接指向相同路径 if (matchList.includes(filePath)) { @@ -334,7 +326,7 @@ async function batchBuildAll({ vueVersion, tasks, formats, message, emptyOutDir, } // design包不排除png文件 - if (/design\/(saas|aurora|smb|)/.test(importer) && /\.png/.test(source)) { + if (/design\/(saas|aurora|)/.test(importer) && /\.png/.test(source)) { return false } diff --git a/internals/cli/src/commands/create/commonMapping.json b/internals/cli/src/commands/create/commonMapping.json index 6f3410707..3c8deb400 100644 --- a/internals/cli/src/commands/create/commonMapping.json +++ b/internals/cli/src/commands/create/commonMapping.json @@ -24,11 +24,6 @@ "type": "module", "exclude": false }, - "DesignSmb": { - "path": "design/smb/index.ts", - "type": "module", - "exclude": false - }, "DesignAurora": { "path": "design/aurora/index.ts", "type": "module", @@ -59,4 +54,4 @@ "type": "template", "exclude": false } -} \ No newline at end of file +} diff --git a/packages/design/smb/index.ts b/packages/design/smb/index.ts deleted file mode 100644 index 5a50d88a7..000000000 --- a/packages/design/smb/index.ts +++ /dev/null @@ -1,7 +0,0 @@ -import { version } from './package.json' - -export default { - name: 'smb', - version, - components: {} -} diff --git a/packages/design/smb/package.json b/packages/design/smb/package.json deleted file mode 100644 index 5f79be08f..000000000 --- a/packages/design/smb/package.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "name": "@opentiny/vue-design-smb", - "version": "3.18.0", - "sideEffects": false, - "type": "module", - "main": "index.ts", - "dependencies": { - "@opentiny/vue-icon": "workspace:~" - }, - "license": "MIT" -} \ No newline at end of file