Skip to content

Commit

Permalink
refactor: rename plugin name (#771)
Browse files Browse the repository at this point in the history
规范插件包名称
工具栏generate-vue插件改名为 generate-code(不限定生成vue代码,传入不同的出码服务可以生成不同技术栈代码)
状态管理插件plugin-data改名为plugin-state,更符合语义
工具栏锁定插件toolbar-checkinout改名为 toolbar-lock,更易理解(当前图标早已切换为lock,而不是之前的checkin和checkout)
  • Loading branch information
hexqi authored Sep 3, 2024
1 parent 3eb2ecd commit 591ff8e
Show file tree
Hide file tree
Showing 38 changed files with 69 additions and 456 deletions.
8 changes: 4 additions & 4 deletions designer-demo/registry.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,11 @@ import {
Save,
Clean,
Preview,
GenerateVue,
GenerateCode,
Refresh,
Collaboration,
Materials,
Data,
State,
Script,
Tree,
Help,
Expand Down Expand Up @@ -72,12 +72,12 @@ export default {
Clean,
Preview,
Refresh,
GenerateVue,
GenerateCode,
Save,
Fullscreen,
Lang
],
plugins: [Materials, Tree, Page, Block, Datasource, Bridge, I18n, Script, Data, Schema, Help, Robot],
plugins: [Materials, Tree, Page, Block, Datasource, Bridge, I18n, Script, State, Schema, Help, Robot],
dsls: [{ id: 'engine.dsls.dslvue' }],
settings: [Props, Styles, Events],
canvas: Canvas
Expand Down
10 changes: 5 additions & 5 deletions jsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"@opentiny/tiny-engine-meta-register": ["packages/register/src/index.js"],
"@opentiny/tiny-engine-canvas": ["packages/canvas/src/index.js"],
"@opentiny/tiny-engine-plugin-materials": ["packages/plugins/materials/index"],
"@opentiny/tiny-engine-plugin-data": ["packages/plugins/data/index"],
"@opentiny/tiny-engine-plugin-state": ["packages/plugins/state/index"],
"@opentiny/tiny-engine-plugin-script": ["packages/plugins/script/index"],
"@opentiny/tiny-engine-plugin-tree": ["packages/plugins/tree/index"],
"@opentiny/tiny-engine-plugin-help": ["packages/plugins/help/index"],
Expand All @@ -24,11 +24,11 @@
"@opentiny/tiny-engine-toolbar-fullscreen": ["packages/toolbars/fullscreen/index"],
"@opentiny/tiny-engine-toolbar-lang": ["packages/toolbars/lang/index"],
"@opentiny/tiny-engine-toolbar-layout": ["packages/toolbars/layout/index"],
"@opentiny/tiny-engine-toolbar-checkinout": ["packages/toolbars/lock/index"],
"@opentiny/tiny-engine-toolbar-lock": ["packages/toolbars/lock/index"],
"@opentiny/tiny-engine-toolbar-logo": ["packages/toolbars/logo/index"],
"@opentiny/tiny-engine-toolbar-media": ["packages/toolbars/media/index"],
"@opentiny/tiny-engine-toolbar-preview": ["packages/toolbars/preview/index"],
"@opentiny/tiny-engine-toolbar-generate-vue": ["packages/toolbars/generate-vue/index"],
"@opentiny/tiny-engine-toolbar-generate-code": ["packages/toolbars/generate-code/index"],
"@opentiny/tiny-engine-toolbar-clean": ["packages/toolbars/clean/index"],
"@opentiny/tiny-engine-toolbar-save": ["packages/toolbars/save/index"],
"tiny-engine-canvas": ["packages/canvas/index"],
Expand All @@ -37,7 +37,7 @@
"@opentiny/tiny-engine-svgs": ["packages/svgs/index"],
"@opentiny/tiny-engine-http": ["packages/http/index"],
"@opentiny/tiny-engine-plugin-materials/*": ["packages/plugins/materials/*"],
"@opentiny/tiny-engine-plugin-data/*": ["packages/plugins/data/*"],
"@opentiny/tiny-engine-plugin-state/*": ["packages/plugins/state/*"],
"@opentiny/tiny-engine-plugin-script/*": ["packages/plugins/script/*"],
"@opentiny/tiny-engine-plugin-tree/*": ["packages/plugins/tree/*"],
"@opentiny/tiny-engine-plugin-help/*": ["packages/plugins/help/*"],
Expand All @@ -53,7 +53,7 @@
"@opentiny/tiny-engine-toolbar-fullscreen/*": ["packages/toolbars/fullscreen/*"],
"@opentiny/tiny-engine-toolbar-lang/*": ["packages/toolbars/lang/*"],
"@opentiny/tiny-engine-toolbar-layout/*": ["packages/toolbars/layout/*"],
"@opentiny/tiny-engine-toolbar-checkinout/*": ["packages/toolbars/lock/*"],
"@opentiny/tiny-engine-toolbar-lock/*": ["packages/toolbars/lock/*"],
"@opentiny/tiny-engine-toolbar-logo/*": ["packages/toolbars/logo/*"],
"@opentiny/tiny-engine-toolbar-media/*": ["packages/toolbars/media/*"],
"@opentiny/tiny-engine-toolbar-preview/*": ["packages/toolbars/preview/*"],
Expand Down
6 changes: 3 additions & 3 deletions packages/build/vite-config/src/vite-plugins/devAliasPlugin.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ const getDevAlias = (useSourceAlias) => {
'@opentiny/tiny-engine-common': path.resolve(basePath, 'packages/common/index.js'),
'@opentiny/tiny-engine-plugin-materials': path.resolve(basePath, 'packages/plugins/materials/index.js'),
'@opentiny/tiny-engine-plugin-block': path.resolve(basePath, 'packages/plugins/block/index.js'),
'@opentiny/tiny-engine-plugin-data': path.resolve(basePath, 'packages/plugins/data/index.js'),
'@opentiny/tiny-engine-plugin-state': path.resolve(basePath, 'packages/plugins/state/index.js'),
'@opentiny/tiny-engine-plugin-datasource': path.resolve(basePath, 'packages/plugins/datasource/index.js'),
'@opentiny/tiny-engine-plugin-script': path.resolve(basePath, 'packages/plugins/script/index.js'),
'@opentiny/tiny-engine-plugin-tree': path.resolve(basePath, 'packages/plugins/tree/index.js'),
Expand All @@ -37,12 +37,12 @@ const getDevAlias = (useSourceAlias) => {
'@opentiny/tiny-engine-toolbar-fullscreen': path.resolve(basePath, 'packages/toolbars/fullscreen/index.js'),
'@opentiny/tiny-engine-toolbar-lang': path.resolve(basePath, 'packages/toolbars/lang/index.js'),
'@opentiny/tiny-engine-toolbar-layout': path.resolve(basePath, 'packages/toolbars/layout/index.js'),
'@opentiny/tiny-engine-toolbar-checkinout': path.resolve(basePath, 'packages/toolbars/lock/index.js'),
'@opentiny/tiny-engine-toolbar-lock': path.resolve(basePath, 'packages/toolbars/lock/index.js'),
'@opentiny/tiny-engine-toolbar-logo': path.resolve(basePath, 'packages/toolbars/logo/index.js'),
'@opentiny/tiny-engine-toolbar-logout': path.resolve(basePath, 'packages/toolbars/logout/index.js'),
'@opentiny/tiny-engine-toolbar-media': path.resolve(basePath, 'packages/toolbars/media/index.js'),
'@opentiny/tiny-engine-toolbar-preview': path.resolve(basePath, 'packages/toolbars/preview/index.js'),
'@opentiny/tiny-engine-toolbar-generate-vue': path.resolve(basePath, 'packages/toolbars/generate-vue/index.js'),
'@opentiny/tiny-engine-toolbar-generate-code': path.resolve(basePath, 'packages/toolbars/generate-code/index.js'),
'@opentiny/tiny-engine-toolbar-refresh': path.resolve(basePath, 'packages/toolbars/refresh/index.js'),
'@opentiny/tiny-engine-toolbar-redoundo': path.resolve(basePath, 'packages/toolbars/redoundo/index.js'),
'@opentiny/tiny-engine-toolbar-clean': path.resolve(basePath, 'packages/toolbars/clean/index.js'),
Expand Down
7 changes: 3 additions & 4 deletions packages/design-core/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,20 +4,19 @@ export { init } from './src/init'
export { default as Breadcrumb, BreadcrumbService } from '@opentiny/tiny-engine-toolbar-breadcrumb'
export { default as Fullscreen } from '@opentiny/tiny-engine-toolbar-fullscreen'
export { default as Lang } from '@opentiny/tiny-engine-toolbar-lang'
export { default as Checkinout } from '@opentiny/tiny-engine-toolbar-checkinout'
export { default as Logo } from '@opentiny/tiny-engine-toolbar-logo'
export { default as Lock } from '@opentiny/tiny-engine-toolbar-checkinout'
export { default as Lock } from '@opentiny/tiny-engine-toolbar-lock'
export { default as Media } from '@opentiny/tiny-engine-toolbar-media'
export { default as Redoundo, HistoryService } from '@opentiny/tiny-engine-toolbar-redoundo'
export { default as Save } from '@opentiny/tiny-engine-toolbar-save'
export { default as Clean } from '@opentiny/tiny-engine-toolbar-clean'
export { default as Preview } from '@opentiny/tiny-engine-toolbar-preview'
export { default as GenerateVue, SaveLocalService } from '@opentiny/tiny-engine-toolbar-generate-vue'
export { default as GenerateCode, SaveLocalService } from '@opentiny/tiny-engine-toolbar-generate-code'
export { default as Refresh } from '@opentiny/tiny-engine-toolbar-refresh'
export { default as Collaboration } from '@opentiny/tiny-engine-toolbar-collaboration'
export { default as Setting } from '@opentiny/tiny-engine-toolbar-setting'
export { default as Materials, ResourceService, MaterialService } from '@opentiny/tiny-engine-plugin-materials'
export { default as Data } from '@opentiny/tiny-engine-plugin-data'
export { default as State } from '@opentiny/tiny-engine-plugin-state'
export { default as Script } from '@opentiny/tiny-engine-plugin-script'
export { default as Tree } from '@opentiny/tiny-engine-plugin-tree'
export { default as Help, HelpService } from '@opentiny/tiny-engine-plugin-help'
Expand Down
6 changes: 3 additions & 3 deletions packages/design-core/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@
"@opentiny/tiny-engine-i18n-host": "workspace:*",
"@opentiny/tiny-engine-plugin-block": "workspace:*",
"@opentiny/tiny-engine-plugin-bridge": "workspace:*",
"@opentiny/tiny-engine-plugin-data": "workspace:*",
"@opentiny/tiny-engine-plugin-state": "workspace:*",
"@opentiny/tiny-engine-plugin-datasource": "workspace:*",
"@opentiny/tiny-engine-plugin-help": "workspace:*",
"@opentiny/tiny-engine-plugin-i18n": "workspace:*",
Expand All @@ -73,11 +73,11 @@
"@opentiny/tiny-engine-theme-light": "workspace:*",
"@opentiny/tiny-engine-theme-base": "workspace:*",
"@opentiny/tiny-engine-toolbar-breadcrumb": "workspace:*",
"@opentiny/tiny-engine-toolbar-checkinout": "workspace:*",
"@opentiny/tiny-engine-toolbar-lock": "workspace:*",
"@opentiny/tiny-engine-toolbar-clean": "workspace:*",
"@opentiny/tiny-engine-toolbar-collaboration": "workspace:*",
"@opentiny/tiny-engine-toolbar-fullscreen": "workspace:*",
"@opentiny/tiny-engine-toolbar-generate-vue": "workspace:*",
"@opentiny/tiny-engine-toolbar-generate-code": "workspace:*",
"@opentiny/tiny-engine-toolbar-lang": "workspace:*",
"@opentiny/tiny-engine-toolbar-layout": "workspace:*",
"@opentiny/tiny-engine-toolbar-logo": "workspace:*",
Expand Down
12 changes: 6 additions & 6 deletions packages/engine-cli/template/designer/registry.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,19 +14,19 @@ import {
Breadcrumb,
Fullscreen,
Lang,
Checkinout,
Lock,
Logo,
Media,
Redoundo,
Save,
Clean,
Preview,
GenerateVue,
GenerateCode,
Refresh,
Collaboration,
Setting,
Materials,
Data,
State,
Script,
Tree,
Help,
Expand Down Expand Up @@ -71,15 +71,15 @@ export default {
Clean,
Refresh,
Save,
GenerateVue,
GenerateCode,
Preview,
Redoundo,
Fullscreen,
Checkinout,
Lock,
Setting,
Lang
],
plugins: [Materials, Tree, Page, Block, Datasource, Bridge, I18n, Script, Data, Schema, Help, Robot],
plugins: [Materials, Tree, Page, Block, Datasource, Bridge, I18n, Script, State, Schema, Help, Robot],
dsls: [{ id: 'engine.dsls.dslvue' }],
settings: [Props, Styles, Events],
canvas: Canvas
Expand Down
22 changes: 0 additions & 22 deletions packages/plugins/data/src/js/constants.js

This file was deleted.

File renamed without changes
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "@opentiny/tiny-engine-plugin-data",
"name": "@opentiny/tiny-engine-plugin-state",
"version": "1.0.3",
"publishConfig": {
"access": "public"
Expand All @@ -15,7 +15,7 @@
"repository": {
"type": "git",
"url": "https://github.com/opentiny/tiny-engine",
"directory": "packages/plugins/data"
"directory": "packages/plugins/state"
},
"bugs": {
"url": "https://github.com/opentiny/tiny-engine/issues"
Expand Down
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
/**
* Copyright (c) 2023 - present TinyEngine Authors.
* Copyright (c) 2023 - present Huawei Cloud Computing Technologies Co., Ltd.
*
* Use of this source code is governed by an MIT-style license.
*
* THE OPEN SOURCE SOFTWARE IN THIS PRODUCT IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL,
* BUT WITHOUT ANY WARRANTY, WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR FITNESS FOR
* A PARTICULAR PURPOSE. SEE THE APPLICABLE LICENSES FOR MORE DETAILS.
*
*/
* Copyright (c) 2023 - present TinyEngine Authors.
* Copyright (c) 2023 - present Huawei Cloud Computing Technologies Co., Ltd.
*
* Use of this source code is governed by an MIT-style license.
*
* THE OPEN SOURCE SOFTWARE IN THIS PRODUCT IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL,
* BUT WITHOUT ANY WARRANTY, WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR FITNESS FOR
* A PARTICULAR PURPOSE. SEE THE APPLICABLE LICENSES FOR MORE DETAILS.
*
*/

/**
* 校验monaco编辑器必填与是否有语法错误
Expand Down
22 changes: 22 additions & 0 deletions packages/plugins/state/src/js/constants.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
/**
* Copyright (c) 2023 - present TinyEngine Authors.
* Copyright (c) 2023 - present Huawei Cloud Computing Technologies Co., Ltd.
*
* Use of this source code is governed by an MIT-style license.
*
* THE OPEN SOURCE SOFTWARE IN THIS PRODUCT IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL,
* BUT WITHOUT ANY WARRANTY, WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR FITNESS FOR
* A PARTICULAR PURPOSE. SEE THE APPLICABLE LICENSES FOR MORE DETAILS.
*
*/

export const STATE = {
CURRENT_STATE: 'current',
GLOBAL_STATE: 'global'
}

export const OPTION_TYPE = {
ADD: 'add',
UPDATE: 'update',
COPY: 'copy'
}
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ export default defineConfig({
build: {
lib: {
entry: path.resolve(__dirname, './index.js'),
name: 'plugin-data',
name: 'plugin-state',
fileName: () => 'index.js',
formats: ['es']
},
Expand Down
2 changes: 1 addition & 1 deletion packages/register/src/constants.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ export const META_APP = {
Clean: 'engine.toolbars.clean',
Refresh: 'engine.toolbars.refresh',
Save: 'engine.toolbars.save',
GenerateVue: 'engine.toolbars.generate-vue',
GenerateCode: 'engine.toolbars.generate-code',
Preview: 'engine.toolbars.preview',
RedoUndo: 'engine.toolbars.redoundo',
Fullscreen: 'engine.toolbars.fullscreen',
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
export default {
id: 'engine.toolbars.generate-vue',
id: 'engine.toolbars.generate-code',
type: 'toolbars',
title: 'generate-vue',
title: 'generate-code',
icon: '',
align: 'right'
}
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "@opentiny/tiny-engine-toolbar-generate-vue",
"name": "@opentiny/tiny-engine-toolbar-generate-code",
"version": "1.0.3",
"publishConfig": {
"access": "public"
Expand All @@ -15,7 +15,7 @@
"repository": {
"type": "git",
"url": "https://github.com/opentiny/tiny-engine",
"directory": "packages/toolbars/generate-vue"
"directory": "packages/toolbars/generate-code"
},
"bugs": {
"url": "https://github.com/opentiny/tiny-engine/issues"
Expand All @@ -27,8 +27,7 @@
"@opentiny/tiny-engine-common": "workspace:*",
"@opentiny/tiny-engine-http": "workspace:*",
"@opentiny/tiny-engine-utils": "workspace:*",
"@opentiny/tiny-engine-meta-register": "workspace:*",
"prettier": "2.7.1"
"@opentiny/tiny-engine-meta-register": "workspace:*"
},
"devDependencies": {
"@vitejs/plugin-vue": "^4.2.3",
Expand Down
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,12 @@ export default defineConfig({
build: {
lib: {
entry: path.resolve(__dirname, './index.js'),
name: 'toolbar-generate-vue',
name: 'toolbar-generate-code',
fileName: () => 'index.js',
formats: ['es']
},
rollupOptions: {
external: ['vue', /@opentiny\/tiny-engine.*/, /@opentiny\/vue.*/, /^prettier.*/]
external: ['vue', /@opentiny\/tiny-engine.*/, /@opentiny\/vue.*/]
}
}
})
Loading

0 comments on commit 591ff8e

Please sign in to comment.