mirror of
https://github.com/Tencent/tmagic-editor.git
synced 2025-06-15 01:09:20 +08:00
build: runtime支持热更新
This commit is contained in:
parent
6d4323123f
commit
4216880d11
@ -9,9 +9,9 @@
|
|||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@element-plus/icons": "0.0.11",
|
"@element-plus/icons": "0.0.11",
|
||||||
"@tmagic/form": "^1.0.0-rc.7",
|
"@tmagic/form": "^1.0.2",
|
||||||
"@tmagic/schema": "^1.0.0-rc.7",
|
"@tmagic/schema": "^1.0.2",
|
||||||
"@tmagic/utils": "^1.0.0-rc.7",
|
"@tmagic/utils": "^1.0.2",
|
||||||
"element-plus": "^2.2.6",
|
"element-plus": "^2.2.6",
|
||||||
"highlight.js": "^11.2.0",
|
"highlight.js": "^11.2.0",
|
||||||
"lodash": "^4.17.21",
|
"lodash": "^4.17.21",
|
||||||
|
@ -40,7 +40,7 @@
|
|||||||
"@types/events": "^3.0.0",
|
"@types/events": "^3.0.0",
|
||||||
"@types/node": "^15.12.4",
|
"@types/node": "^15.12.4",
|
||||||
"typescript": "^4.3.4",
|
"typescript": "^4.3.4",
|
||||||
"vite": "^2.3.7",
|
"vite": "^ 2.9.13",
|
||||||
"vite-plugin-dts": "^0.9.6"
|
"vite-plugin-dts": "^0.9.6"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -70,13 +70,12 @@
|
|||||||
"@types/lodash-es": "^4.17.4",
|
"@types/lodash-es": "^4.17.4",
|
||||||
"@types/node": "^15.12.4",
|
"@types/node": "^15.12.4",
|
||||||
"@types/serialize-javascript": "^5.0.1",
|
"@types/serialize-javascript": "^5.0.1",
|
||||||
"@vitejs/plugin-vue": "^1.2.3",
|
"@vitejs/plugin-vue": "^2.3.3",
|
||||||
"@vitejs/plugin-vue-jsx": "^1.1.6",
|
|
||||||
"@vue/compiler-sfc": "^3.2.0",
|
"@vue/compiler-sfc": "^3.2.0",
|
||||||
"@vue/test-utils": "^2.0.0",
|
"@vue/test-utils": "^2.0.0",
|
||||||
"sass": "^1.35.1",
|
"sass": "^1.35.1",
|
||||||
"typescript": "^4.3.4",
|
"typescript": "^4.3.4",
|
||||||
"vite": "^2.3.7",
|
"vite": "^ 2.9.13",
|
||||||
"vite-plugin-dts": "^0.9.6",
|
"vite-plugin-dts": "^0.9.6",
|
||||||
"vue-tsc": "^0.38.2"
|
"vue-tsc": "^0.38.2"
|
||||||
}
|
}
|
||||||
|
@ -49,13 +49,12 @@
|
|||||||
"@types/lodash-es": "^4.17.4",
|
"@types/lodash-es": "^4.17.4",
|
||||||
"@types/node": "^15.12.4",
|
"@types/node": "^15.12.4",
|
||||||
"@types/sortablejs": "^1.10.7",
|
"@types/sortablejs": "^1.10.7",
|
||||||
"@vitejs/plugin-vue": "^1.2.3",
|
"@vitejs/plugin-vue": "^2.3.3",
|
||||||
"@vitejs/plugin-vue-jsx": "^1.1.6",
|
|
||||||
"@vue/compiler-sfc": "^3.2.0",
|
"@vue/compiler-sfc": "^3.2.0",
|
||||||
"@vue/test-utils": "^2.0.0",
|
"@vue/test-utils": "^2.0.0",
|
||||||
"sass": "^1.35.1",
|
"sass": "^1.35.1",
|
||||||
"typescript": "^4.3.4",
|
"typescript": "^4.3.4",
|
||||||
"vite": "^2.3.7",
|
"vite": "^ 2.9.13",
|
||||||
"vite-plugin-dts": "^0.9.6",
|
"vite-plugin-dts": "^0.9.6",
|
||||||
"vue-tsc": "^0.38.2"
|
"vue-tsc": "^0.38.2"
|
||||||
}
|
}
|
||||||
|
@ -19,7 +19,7 @@
|
|||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@types/node": "^15.12.4",
|
"@types/node": "^15.12.4",
|
||||||
"typescript": "^4.3.4",
|
"typescript": "^4.3.4",
|
||||||
"vite": "^2.3.7",
|
"vite": "^ 2.9.13",
|
||||||
"vite-plugin-dts": "^0.9.6"
|
"vite-plugin-dts": "^0.9.6"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -41,7 +41,7 @@
|
|||||||
"@types/node": "^15.12.4",
|
"@types/node": "^15.12.4",
|
||||||
"sass": "^1.35.1",
|
"sass": "^1.35.1",
|
||||||
"typescript": "^4.3.4",
|
"typescript": "^4.3.4",
|
||||||
"vite": "^2.3.7",
|
"vite": "^ 2.9.13",
|
||||||
"vite-plugin-dts": "^0.9.6"
|
"vite-plugin-dts": "^0.9.6"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -44,12 +44,12 @@
|
|||||||
"@types/color": "^3.0.1",
|
"@types/color": "^3.0.1",
|
||||||
"@types/lodash-es": "^4.17.4",
|
"@types/lodash-es": "^4.17.4",
|
||||||
"@types/node": "^15.12.4",
|
"@types/node": "^15.12.4",
|
||||||
"@vitejs/plugin-vue": "^1.2.3",
|
"@vitejs/plugin-vue": "^2.3.3",
|
||||||
"@vue/compiler-sfc": "^3.2.0",
|
"@vue/compiler-sfc": "^3.2.0",
|
||||||
"@vue/test-utils": "^2.0.0",
|
"@vue/test-utils": "^2.0.0",
|
||||||
"sass": "^1.35.1",
|
"sass": "^1.35.1",
|
||||||
"typescript": "^4.3.4",
|
"typescript": "^4.3.4",
|
||||||
"vite": "^2.3.7",
|
"vite": "^ 2.9.13",
|
||||||
"vite-plugin-dts": "^0.9.6",
|
"vite-plugin-dts": "^0.9.6",
|
||||||
"vue-tsc": "^0.38.2"
|
"vue-tsc": "^0.38.2"
|
||||||
}
|
}
|
||||||
|
@ -16,4 +16,25 @@
|
|||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
export default [];
|
export default [
|
||||||
|
{
|
||||||
|
text: '页面标识',
|
||||||
|
name: 'name',
|
||||||
|
disabled: true,
|
||||||
|
extra: '在多页面的情况下用来指定要打开的页面',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
text: '页面标题',
|
||||||
|
name: 'title',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: 'layout',
|
||||||
|
text: '容器布局',
|
||||||
|
type: 'select',
|
||||||
|
defaultValue: 'absolute',
|
||||||
|
options: [
|
||||||
|
{ value: 'absolute', text: '绝对定位' },
|
||||||
|
{ value: 'relative', text: '流式布局' },
|
||||||
|
],
|
||||||
|
},
|
||||||
|
];
|
||||||
|
@ -28,7 +28,7 @@
|
|||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@types/node": "^15.12.4",
|
"@types/node": "^15.12.4",
|
||||||
"typescript": "^4.3.4",
|
"typescript": "^4.3.4",
|
||||||
"vite": "^2.3.7",
|
"vite": "^ 2.9.13",
|
||||||
"vite-plugin-dts": "^0.9.6"
|
"vite-plugin-dts": "^0.9.6"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -27,12 +27,12 @@
|
|||||||
"@types/node": "^15.12.4",
|
"@types/node": "^15.12.4",
|
||||||
"@types/serialize-javascript": "^5.0.1",
|
"@types/serialize-javascript": "^5.0.1",
|
||||||
"@vitejs/plugin-legacy": "^1.8.2",
|
"@vitejs/plugin-legacy": "^1.8.2",
|
||||||
"@vitejs/plugin-vue": "^1.2.3",
|
"@vitejs/plugin-vue": "^2.3.3",
|
||||||
"@vitejs/plugin-vue-jsx": "^1.1.6",
|
"@vitejs/plugin-vue-jsx": "^1.3.10",
|
||||||
"@vue/compiler-sfc": "^3.2.0",
|
"@vue/compiler-sfc": "^3.2.0",
|
||||||
"sass": "^1.35.1",
|
"sass": "^1.35.1",
|
||||||
"typescript": "^4.3.4",
|
"typescript": "^4.3.4",
|
||||||
"vite": "^2.3.7",
|
"vite": "^ 2.9.13",
|
||||||
"vue-tsc": "^0.38.2"
|
"vue-tsc": "^0.38.2"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -61,17 +61,7 @@ export default defineConfig({
|
|||||||
host: '0.0.0.0',
|
host: '0.0.0.0',
|
||||||
port: 8098,
|
port: 8098,
|
||||||
proxy: {
|
proxy: {
|
||||||
'^/tmagic-editor/playground/runtime/react': {
|
'^/tmagic-editor/playground/runtime': {
|
||||||
target: 'http://127.0.0.1:8076',
|
|
||||||
changeOrigin: true,
|
|
||||||
prependPath: false,
|
|
||||||
},
|
|
||||||
'^/tmagic-editor/playground/runtime/vue2': {
|
|
||||||
target: 'http://127.0.0.1:8077',
|
|
||||||
changeOrigin: true,
|
|
||||||
prependPath: false,
|
|
||||||
},
|
|
||||||
'^/tmagic-editor/playground/runtime/vue3': {
|
|
||||||
target: 'http://127.0.0.1:8078',
|
target: 'http://127.0.0.1:8078',
|
||||||
changeOrigin: true,
|
changeOrigin: true,
|
||||||
prependPath: false,
|
prependPath: false,
|
||||||
|
231
pnpm-lock.yaml
generated
231
pnpm-lock.yaml
generated
@ -110,7 +110,7 @@ importers:
|
|||||||
'@types/node': ^15.12.4
|
'@types/node': ^15.12.4
|
||||||
events: ^3.3.0
|
events: ^3.3.0
|
||||||
typescript: ^4.3.4
|
typescript: ^4.3.4
|
||||||
vite: ^2.3.7
|
vite: ^ 2.9.13
|
||||||
vite-plugin-dts: ^0.9.6
|
vite-plugin-dts: ^0.9.6
|
||||||
dependencies:
|
dependencies:
|
||||||
'@tmagic/schema': link:../schema
|
'@tmagic/schema': link:../schema
|
||||||
@ -119,8 +119,8 @@ importers:
|
|||||||
'@types/events': 3.0.0
|
'@types/events': 3.0.0
|
||||||
'@types/node': 15.14.9
|
'@types/node': 15.14.9
|
||||||
typescript: 4.7.3
|
typescript: 4.7.3
|
||||||
vite: 2.9.10
|
vite: 2.9.13
|
||||||
vite-plugin-dts: 0.9.10_vite@2.9.10
|
vite-plugin-dts: 0.9.10_vite@2.9.13
|
||||||
|
|
||||||
packages/editor:
|
packages/editor:
|
||||||
specifiers:
|
specifiers:
|
||||||
@ -135,8 +135,7 @@ importers:
|
|||||||
'@types/lodash-es': ^4.17.4
|
'@types/lodash-es': ^4.17.4
|
||||||
'@types/node': ^15.12.4
|
'@types/node': ^15.12.4
|
||||||
'@types/serialize-javascript': ^5.0.1
|
'@types/serialize-javascript': ^5.0.1
|
||||||
'@vitejs/plugin-vue': ^1.2.3
|
'@vitejs/plugin-vue': ^2.3.3
|
||||||
'@vitejs/plugin-vue-jsx': ^1.1.6
|
|
||||||
'@vue/compiler-sfc': ^3.2.0
|
'@vue/compiler-sfc': ^3.2.0
|
||||||
'@vue/test-utils': ^2.0.0
|
'@vue/test-utils': ^2.0.0
|
||||||
buffer: ^6.0.3
|
buffer: ^6.0.3
|
||||||
@ -150,7 +149,7 @@ importers:
|
|||||||
sass: ^1.35.1
|
sass: ^1.35.1
|
||||||
serialize-javascript: ^6.0.0
|
serialize-javascript: ^6.0.0
|
||||||
typescript: ^4.3.4
|
typescript: ^4.3.4
|
||||||
vite: ^2.3.7
|
vite: ^ 2.9.13
|
||||||
vite-plugin-dts: ^0.9.6
|
vite-plugin-dts: ^0.9.6
|
||||||
vue: ^3.2.0
|
vue: ^3.2.0
|
||||||
vue-tsc: ^0.38.2
|
vue-tsc: ^0.38.2
|
||||||
@ -177,14 +176,13 @@ importers:
|
|||||||
'@types/lodash-es': 4.17.6
|
'@types/lodash-es': 4.17.6
|
||||||
'@types/node': 15.14.9
|
'@types/node': 15.14.9
|
||||||
'@types/serialize-javascript': 5.0.2
|
'@types/serialize-javascript': 5.0.2
|
||||||
'@vitejs/plugin-vue': 1.10.2_vite@2.9.10
|
'@vitejs/plugin-vue': 2.3.3_vite@2.9.13+vue@3.2.37
|
||||||
'@vitejs/plugin-vue-jsx': 1.3.10
|
|
||||||
'@vue/compiler-sfc': 3.2.37
|
'@vue/compiler-sfc': 3.2.37
|
||||||
'@vue/test-utils': 2.0.0_vue@3.2.37
|
'@vue/test-utils': 2.0.0_vue@3.2.37
|
||||||
sass: 1.52.2
|
sass: 1.52.2
|
||||||
typescript: 4.7.3
|
typescript: 4.7.3
|
||||||
vite: 2.9.10_sass@1.52.2
|
vite: 2.9.13_sass@1.52.2
|
||||||
vite-plugin-dts: 0.9.10_vite@2.9.10
|
vite-plugin-dts: 0.9.10_vite@2.9.13
|
||||||
vue-tsc: 0.38.2_typescript@4.7.3
|
vue-tsc: 0.38.2_typescript@4.7.3
|
||||||
|
|
||||||
packages/form:
|
packages/form:
|
||||||
@ -195,8 +193,7 @@ importers:
|
|||||||
'@types/lodash-es': ^4.17.4
|
'@types/lodash-es': ^4.17.4
|
||||||
'@types/node': ^15.12.4
|
'@types/node': ^15.12.4
|
||||||
'@types/sortablejs': ^1.10.7
|
'@types/sortablejs': ^1.10.7
|
||||||
'@vitejs/plugin-vue': ^1.2.3
|
'@vitejs/plugin-vue': ^2.3.3
|
||||||
'@vitejs/plugin-vue-jsx': ^1.1.6
|
|
||||||
'@vue/compiler-sfc': ^3.2.0
|
'@vue/compiler-sfc': ^3.2.0
|
||||||
'@vue/test-utils': ^2.0.0
|
'@vue/test-utils': ^2.0.0
|
||||||
element-plus: ^2.2.6
|
element-plus: ^2.2.6
|
||||||
@ -205,7 +202,7 @@ importers:
|
|||||||
sass: ^1.35.1
|
sass: ^1.35.1
|
||||||
sortablejs: ^1.14.0
|
sortablejs: ^1.14.0
|
||||||
typescript: ^4.3.4
|
typescript: ^4.3.4
|
||||||
vite: ^2.3.7
|
vite: ^ 2.9.13
|
||||||
vite-plugin-dts: ^0.9.6
|
vite-plugin-dts: ^0.9.6
|
||||||
vue: ^3.2.0
|
vue: ^3.2.0
|
||||||
vue-tsc: ^0.38.2
|
vue-tsc: ^0.38.2
|
||||||
@ -222,27 +219,26 @@ importers:
|
|||||||
'@types/lodash-es': 4.17.6
|
'@types/lodash-es': 4.17.6
|
||||||
'@types/node': 15.14.9
|
'@types/node': 15.14.9
|
||||||
'@types/sortablejs': 1.13.0
|
'@types/sortablejs': 1.13.0
|
||||||
'@vitejs/plugin-vue': 1.10.2_vite@2.9.10
|
'@vitejs/plugin-vue': 2.3.3_vite@2.9.13+vue@3.2.37
|
||||||
'@vitejs/plugin-vue-jsx': 1.3.10
|
|
||||||
'@vue/compiler-sfc': 3.2.37
|
'@vue/compiler-sfc': 3.2.37
|
||||||
'@vue/test-utils': 2.0.0_vue@3.2.37
|
'@vue/test-utils': 2.0.0_vue@3.2.37
|
||||||
sass: 1.52.2
|
sass: 1.52.2
|
||||||
typescript: 4.7.3
|
typescript: 4.7.3
|
||||||
vite: 2.9.10_sass@1.52.2
|
vite: 2.9.13_sass@1.52.2
|
||||||
vite-plugin-dts: 0.9.10_vite@2.9.10
|
vite-plugin-dts: 0.9.10_vite@2.9.13
|
||||||
vue-tsc: 0.38.2_typescript@4.7.3
|
vue-tsc: 0.38.2_typescript@4.7.3
|
||||||
|
|
||||||
packages/schema:
|
packages/schema:
|
||||||
specifiers:
|
specifiers:
|
||||||
'@types/node': ^15.12.4
|
'@types/node': ^15.12.4
|
||||||
typescript: ^4.3.4
|
typescript: ^4.3.4
|
||||||
vite: ^2.3.7
|
vite: ^ 2.9.13
|
||||||
vite-plugin-dts: ^0.9.6
|
vite-plugin-dts: ^0.9.6
|
||||||
devDependencies:
|
devDependencies:
|
||||||
'@types/node': 15.14.9
|
'@types/node': 15.14.9
|
||||||
typescript: 4.7.3
|
typescript: 4.7.3
|
||||||
vite: 2.9.10
|
vite: 2.9.13
|
||||||
vite-plugin-dts: 0.9.10_vite@2.9.10
|
vite-plugin-dts: 0.9.10_vite@2.9.13
|
||||||
|
|
||||||
packages/stage:
|
packages/stage:
|
||||||
specifiers:
|
specifiers:
|
||||||
@ -259,7 +255,7 @@ importers:
|
|||||||
moveable-helper: ^0.4.0
|
moveable-helper: ^0.4.0
|
||||||
sass: ^1.35.1
|
sass: ^1.35.1
|
||||||
typescript: ^4.3.4
|
typescript: ^4.3.4
|
||||||
vite: ^2.3.7
|
vite: ^ 2.9.13
|
||||||
vite-plugin-dts: ^0.9.6
|
vite-plugin-dts: ^0.9.6
|
||||||
dependencies:
|
dependencies:
|
||||||
'@scena/guides': 0.17.0
|
'@scena/guides': 0.17.0
|
||||||
@ -276,8 +272,8 @@ importers:
|
|||||||
'@types/node': 15.14.9
|
'@types/node': 15.14.9
|
||||||
sass: 1.52.2
|
sass: 1.52.2
|
||||||
typescript: 4.7.3
|
typescript: 4.7.3
|
||||||
vite: 2.9.10_sass@1.52.2
|
vite: 2.9.13_sass@1.52.2
|
||||||
vite-plugin-dts: 0.9.10_vite@2.9.10
|
vite-plugin-dts: 0.9.10_vite@2.9.13
|
||||||
|
|
||||||
packages/table:
|
packages/table:
|
||||||
specifiers:
|
specifiers:
|
||||||
@ -285,14 +281,14 @@ importers:
|
|||||||
'@types/color': ^3.0.1
|
'@types/color': ^3.0.1
|
||||||
'@types/lodash-es': ^4.17.4
|
'@types/lodash-es': ^4.17.4
|
||||||
'@types/node': ^15.12.4
|
'@types/node': ^15.12.4
|
||||||
'@vitejs/plugin-vue': ^1.2.3
|
'@vitejs/plugin-vue': ^2.3.3
|
||||||
'@vue/compiler-sfc': ^3.2.0
|
'@vue/compiler-sfc': ^3.2.0
|
||||||
'@vue/test-utils': ^2.0.0
|
'@vue/test-utils': ^2.0.0
|
||||||
element-plus: ^2.2.6
|
element-plus: ^2.2.6
|
||||||
lodash-es: ^4.17.21
|
lodash-es: ^4.17.21
|
||||||
sass: ^1.35.1
|
sass: ^1.35.1
|
||||||
typescript: ^4.3.4
|
typescript: ^4.3.4
|
||||||
vite: ^2.3.7
|
vite: ^ 2.9.13
|
||||||
vite-plugin-dts: ^0.9.6
|
vite-plugin-dts: ^0.9.6
|
||||||
vue: ^3.2.0
|
vue: ^3.2.0
|
||||||
vue-tsc: ^0.38.2
|
vue-tsc: ^0.38.2
|
||||||
@ -305,13 +301,13 @@ importers:
|
|||||||
'@types/color': 3.0.3
|
'@types/color': 3.0.3
|
||||||
'@types/lodash-es': 4.17.6
|
'@types/lodash-es': 4.17.6
|
||||||
'@types/node': 15.14.9
|
'@types/node': 15.14.9
|
||||||
'@vitejs/plugin-vue': 1.10.2_vite@2.9.10
|
'@vitejs/plugin-vue': 2.3.3_vite@2.9.13+vue@3.2.37
|
||||||
'@vue/compiler-sfc': 3.2.37
|
'@vue/compiler-sfc': 3.2.37
|
||||||
'@vue/test-utils': 2.0.0_vue@3.2.37
|
'@vue/test-utils': 2.0.0_vue@3.2.37
|
||||||
sass: 1.52.2
|
sass: 1.52.2
|
||||||
typescript: 4.7.3
|
typescript: 4.7.3
|
||||||
vite: 2.9.10_sass@1.52.2
|
vite: 2.9.13_sass@1.52.2
|
||||||
vite-plugin-dts: 0.9.10_vite@2.9.10
|
vite-plugin-dts: 0.9.10_vite@2.9.13
|
||||||
vue-tsc: 0.38.2_typescript@4.7.3
|
vue-tsc: 0.38.2_typescript@4.7.3
|
||||||
|
|
||||||
packages/ui:
|
packages/ui:
|
||||||
@ -381,7 +377,7 @@ importers:
|
|||||||
'@types/node': ^15.12.4
|
'@types/node': ^15.12.4
|
||||||
moment: ^2.29.2
|
moment: ^2.29.2
|
||||||
typescript: ^4.3.4
|
typescript: ^4.3.4
|
||||||
vite: ^2.3.7
|
vite: ^ 2.9.13
|
||||||
vite-plugin-dts: ^0.9.6
|
vite-plugin-dts: ^0.9.6
|
||||||
dependencies:
|
dependencies:
|
||||||
'@tmagic/schema': link:../schema
|
'@tmagic/schema': link:../schema
|
||||||
@ -389,8 +385,8 @@ importers:
|
|||||||
devDependencies:
|
devDependencies:
|
||||||
'@types/node': 15.14.9
|
'@types/node': 15.14.9
|
||||||
typescript: 4.7.3
|
typescript: 4.7.3
|
||||||
vite: 2.9.10
|
vite: 2.9.13
|
||||||
vite-plugin-dts: 0.9.10_vite@2.9.10
|
vite-plugin-dts: 0.9.10_vite@2.9.13
|
||||||
|
|
||||||
playground:
|
playground:
|
||||||
specifiers:
|
specifiers:
|
||||||
@ -403,15 +399,15 @@ importers:
|
|||||||
'@types/node': ^15.12.4
|
'@types/node': ^15.12.4
|
||||||
'@types/serialize-javascript': ^5.0.1
|
'@types/serialize-javascript': ^5.0.1
|
||||||
'@vitejs/plugin-legacy': ^1.8.2
|
'@vitejs/plugin-legacy': ^1.8.2
|
||||||
'@vitejs/plugin-vue': ^1.2.3
|
'@vitejs/plugin-vue': ^2.3.3
|
||||||
'@vitejs/plugin-vue-jsx': ^1.1.6
|
'@vitejs/plugin-vue-jsx': ^1.3.10
|
||||||
'@vue/compiler-sfc': ^3.2.0
|
'@vue/compiler-sfc': ^3.2.0
|
||||||
element-plus: ^2.2.6
|
element-plus: ^2.2.6
|
||||||
monaco-editor: ^0.32.1
|
monaco-editor: ^0.32.1
|
||||||
sass: ^1.35.1
|
sass: ^1.35.1
|
||||||
serialize-javascript: ^6.0.0
|
serialize-javascript: ^6.0.0
|
||||||
typescript: ^4.3.4
|
typescript: ^4.3.4
|
||||||
vite: ^2.3.7
|
vite: ^ 2.9.13
|
||||||
vue: ^3.2.0
|
vue: ^3.2.0
|
||||||
vue-router: ^4.0.10
|
vue-router: ^4.0.10
|
||||||
vue-tsc: ^0.38.2
|
vue-tsc: ^0.38.2
|
||||||
@ -430,13 +426,13 @@ importers:
|
|||||||
devDependencies:
|
devDependencies:
|
||||||
'@types/node': 15.14.9
|
'@types/node': 15.14.9
|
||||||
'@types/serialize-javascript': 5.0.2
|
'@types/serialize-javascript': 5.0.2
|
||||||
'@vitejs/plugin-legacy': 1.8.2_vite@2.9.10
|
'@vitejs/plugin-legacy': 1.8.2_vite@2.9.13
|
||||||
'@vitejs/plugin-vue': 1.10.2_vite@2.9.10
|
'@vitejs/plugin-vue': 2.3.3_vite@2.9.13+vue@3.2.37
|
||||||
'@vitejs/plugin-vue-jsx': 1.3.10
|
'@vitejs/plugin-vue-jsx': 1.3.10
|
||||||
'@vue/compiler-sfc': 3.2.37
|
'@vue/compiler-sfc': 3.2.37
|
||||||
sass: 1.52.2
|
sass: 1.52.2
|
||||||
typescript: 4.7.3
|
typescript: 4.7.3
|
||||||
vite: 2.9.10_sass@1.52.2
|
vite: 2.9.13_sass@1.52.2
|
||||||
vue-tsc: 0.38.2_typescript@4.7.3
|
vue-tsc: 0.38.2_typescript@4.7.3
|
||||||
|
|
||||||
runtime/react:
|
runtime/react:
|
||||||
@ -450,7 +446,7 @@ importers:
|
|||||||
react-dom: ^17.0.2
|
react-dom: ^17.0.2
|
||||||
recast: ^0.20.4
|
recast: ^0.20.4
|
||||||
typescript: ^4.3.4
|
typescript: ^4.3.4
|
||||||
vite: ^2.3.7
|
vite: ^ 2.9.13
|
||||||
dependencies:
|
dependencies:
|
||||||
'@tmagic/schema': link:../../packages/schema
|
'@tmagic/schema': link:../../packages/schema
|
||||||
'@tmagic/stage': link:../../packages/stage
|
'@tmagic/stage': link:../../packages/stage
|
||||||
@ -462,7 +458,7 @@ importers:
|
|||||||
'@vitejs/plugin-react-refresh': 1.3.6
|
'@vitejs/plugin-react-refresh': 1.3.6
|
||||||
recast: 0.20.5
|
recast: 0.20.5
|
||||||
typescript: 4.7.3
|
typescript: 4.7.3
|
||||||
vite: 2.9.10
|
vite: 2.9.13
|
||||||
|
|
||||||
runtime/vue2:
|
runtime/vue2:
|
||||||
specifiers:
|
specifiers:
|
||||||
@ -475,7 +471,7 @@ importers:
|
|||||||
rollup: ^2.25.0
|
rollup: ^2.25.0
|
||||||
rollup-plugin-external-globals: ^0.6.1
|
rollup-plugin-external-globals: ^0.6.1
|
||||||
sass: ^1.35.1
|
sass: ^1.35.1
|
||||||
vite: ^2.3.7
|
vite: ^ 2.9.13
|
||||||
vite-plugin-vue2: ^2.0.1
|
vite-plugin-vue2: ^2.0.1
|
||||||
vue: ^2.6.14
|
vue: ^2.6.14
|
||||||
vue-template-compiler: ^2.6.14
|
vue-template-compiler: ^2.6.14
|
||||||
@ -491,8 +487,8 @@ importers:
|
|||||||
rollup: 2.75.5
|
rollup: 2.75.5
|
||||||
rollup-plugin-external-globals: 0.6.1_rollup@2.75.5
|
rollup-plugin-external-globals: 0.6.1_rollup@2.75.5
|
||||||
sass: 1.52.2
|
sass: 1.52.2
|
||||||
vite: 2.9.10_sass@1.52.2
|
vite: 2.9.13_sass@1.52.2
|
||||||
vite-plugin-vue2: 2.0.1_5jesfqc2ouaeplxglzazh5atyu
|
vite-plugin-vue2: 2.0.1_rjze3w2zsgj4z24tnggj7hdbyq
|
||||||
vue-template-compiler: 2.6.14
|
vue-template-compiler: 2.6.14
|
||||||
|
|
||||||
runtime/vue3:
|
runtime/vue3:
|
||||||
@ -500,7 +496,7 @@ importers:
|
|||||||
'@tmagic/schema': 1.0.2
|
'@tmagic/schema': 1.0.2
|
||||||
'@tmagic/stage': 1.0.2
|
'@tmagic/stage': 1.0.2
|
||||||
'@types/node': ^15.12.4
|
'@types/node': ^15.12.4
|
||||||
'@vitejs/plugin-vue': ^1.2.3
|
'@vitejs/plugin-vue': ^2.3.3
|
||||||
'@vue/compiler-sfc': ^3.2.0
|
'@vue/compiler-sfc': ^3.2.0
|
||||||
'@vue/test-utils': ^2.0.0
|
'@vue/test-utils': ^2.0.0
|
||||||
axios: ^0.25.0
|
axios: ^0.25.0
|
||||||
@ -509,7 +505,7 @@ importers:
|
|||||||
rollup-plugin-external-globals: ^0.6.1
|
rollup-plugin-external-globals: ^0.6.1
|
||||||
sass: ^1.35.1
|
sass: ^1.35.1
|
||||||
typescript: ^4.3.4
|
typescript: ^4.3.4
|
||||||
vite: ^2.3.7
|
vite: ^ 2.9.13
|
||||||
vue: ^3.2.0
|
vue: ^3.2.0
|
||||||
vue-tsc: ^0.38.2
|
vue-tsc: ^0.38.2
|
||||||
dependencies:
|
dependencies:
|
||||||
@ -519,7 +515,7 @@ importers:
|
|||||||
vue: 3.2.37
|
vue: 3.2.37
|
||||||
devDependencies:
|
devDependencies:
|
||||||
'@types/node': 15.14.9
|
'@types/node': 15.14.9
|
||||||
'@vitejs/plugin-vue': 1.10.2_vite@2.9.10
|
'@vitejs/plugin-vue': 2.3.3_vite@2.9.13+vue@3.2.37
|
||||||
'@vue/compiler-sfc': 3.2.37
|
'@vue/compiler-sfc': 3.2.37
|
||||||
'@vue/test-utils': 2.0.0_vue@3.2.37
|
'@vue/test-utils': 2.0.0_vue@3.2.37
|
||||||
recast: 0.20.5
|
recast: 0.20.5
|
||||||
@ -527,7 +523,7 @@ importers:
|
|||||||
rollup-plugin-external-globals: 0.6.1_rollup@2.75.5
|
rollup-plugin-external-globals: 0.6.1_rollup@2.75.5
|
||||||
sass: 1.52.2
|
sass: 1.52.2
|
||||||
typescript: 4.7.3
|
typescript: 4.7.3
|
||||||
vite: 2.9.10_sass@1.52.2
|
vite: 2.9.13_sass@1.52.2
|
||||||
vue-tsc: 0.38.2_typescript@4.7.3
|
vue-tsc: 0.38.2_typescript@4.7.3
|
||||||
|
|
||||||
packages:
|
packages:
|
||||||
@ -1775,7 +1771,7 @@ packages:
|
|||||||
eslint-visitor-keys: 2.1.0
|
eslint-visitor-keys: 2.1.0
|
||||||
dev: true
|
dev: true
|
||||||
|
|
||||||
/@vitejs/plugin-legacy/1.8.2_vite@2.9.10:
|
/@vitejs/plugin-legacy/1.8.2_vite@2.9.13:
|
||||||
resolution: {integrity: sha512-NCOKU+pU+cxLMR9P9RTolEuOK+h+zYBXlknj+zGcKSj/NXBZYgA1GAH1FnO4zijoWRiTaiOm2ha9LQrELE7XHg==}
|
resolution: {integrity: sha512-NCOKU+pU+cxLMR9P9RTolEuOK+h+zYBXlknj+zGcKSj/NXBZYgA1GAH1FnO4zijoWRiTaiOm2ha9LQrELE7XHg==}
|
||||||
engines: {node: '>=12.0.0'}
|
engines: {node: '>=12.0.0'}
|
||||||
peerDependencies:
|
peerDependencies:
|
||||||
@ -1786,7 +1782,7 @@ packages:
|
|||||||
magic-string: 0.26.2
|
magic-string: 0.26.2
|
||||||
regenerator-runtime: 0.13.9
|
regenerator-runtime: 0.13.9
|
||||||
systemjs: 6.12.1
|
systemjs: 6.12.1
|
||||||
vite: 2.9.10_sass@1.52.2
|
vite: 2.9.13_sass@1.52.2
|
||||||
dev: true
|
dev: true
|
||||||
|
|
||||||
/@vitejs/plugin-react-refresh/1.3.6:
|
/@vitejs/plugin-react-refresh/1.3.6:
|
||||||
@ -1837,6 +1833,17 @@ packages:
|
|||||||
vue: 3.2.37
|
vue: 3.2.37
|
||||||
dev: true
|
dev: true
|
||||||
|
|
||||||
|
/@vitejs/plugin-vue/2.3.3_vite@2.9.13+vue@3.2.37:
|
||||||
|
resolution: {integrity: sha512-SmQLDyhz+6lGJhPELsBdzXGc+AcaT8stgkbiTFGpXPe8Tl1tJaBw1A6pxDqDuRsVkD8uscrkx3hA7QDOoKYtyw==}
|
||||||
|
engines: {node: '>=12.0.0'}
|
||||||
|
peerDependencies:
|
||||||
|
vite: ^2.5.10
|
||||||
|
vue: ^3.2.25
|
||||||
|
dependencies:
|
||||||
|
vite: 2.9.13_sass@1.52.2
|
||||||
|
vue: 3.2.37
|
||||||
|
dev: true
|
||||||
|
|
||||||
/@volar/code-gen/0.38.2:
|
/@volar/code-gen/0.38.2:
|
||||||
resolution: {integrity: sha512-H81I6d7rZB7teqL+zhK/Xz1v0/kKkUwkB0Aq6b4+BTCqcJeiZkoWxd0gFhrhWTnUoqiM83lhoTGo2vkvx5YagQ==}
|
resolution: {integrity: sha512-H81I6d7rZB7teqL+zhK/Xz1v0/kKkUwkB0Aq6b4+BTCqcJeiZkoWxd0gFhrhWTnUoqiM83lhoTGo2vkvx5YagQ==}
|
||||||
dependencies:
|
dependencies:
|
||||||
@ -7086,7 +7093,7 @@ packages:
|
|||||||
dev: true
|
dev: true
|
||||||
|
|
||||||
/svg-tags/1.0.0:
|
/svg-tags/1.0.0:
|
||||||
resolution: {integrity: sha1-WPcc7jvVGbWdSyqEO2x95krAR2Q=}
|
resolution: {integrity: sha512-ovssysQTa+luh7A5Weu3Rta6FJlFBBbInjOh722LIt6klpU2/HtdUbszju/G4devcvk8PGt7FCLv5wftu3THUA==}
|
||||||
dev: true
|
dev: true
|
||||||
|
|
||||||
/symbol-tree/3.2.4:
|
/symbol-tree/3.2.4:
|
||||||
@ -7411,7 +7418,7 @@ packages:
|
|||||||
spdx-expression-parse: 3.0.1
|
spdx-expression-parse: 3.0.1
|
||||||
dev: true
|
dev: true
|
||||||
|
|
||||||
/vite-plugin-dts/0.9.10_vite@2.9.10:
|
/vite-plugin-dts/0.9.10_vite@2.9.13:
|
||||||
resolution: {integrity: sha512-dNfFJXRsm3YW8k+Wm8SesSaEGOaicKdgFz5PoUpT9zUh6URr5cwu5NMOBhJgiofrzcuYtOU2Ez7JQtg68RII8g==}
|
resolution: {integrity: sha512-dNfFJXRsm3YW8k+Wm8SesSaEGOaicKdgFz5PoUpT9zUh6URr5cwu5NMOBhJgiofrzcuYtOU2Ez7JQtg68RII8g==}
|
||||||
engines: {node: '>=12.0.0'}
|
engines: {node: '>=12.0.0'}
|
||||||
peerDependencies:
|
peerDependencies:
|
||||||
@ -7420,7 +7427,7 @@ packages:
|
|||||||
fast-glob: 3.2.11
|
fast-glob: 3.2.11
|
||||||
fs-extra: 10.1.0
|
fs-extra: 10.1.0
|
||||||
ts-morph: 13.0.3
|
ts-morph: 13.0.3
|
||||||
vite: 2.9.10
|
vite: 2.9.13
|
||||||
dev: true
|
dev: true
|
||||||
|
|
||||||
/vite-plugin-vue2/2.0.1_5jesfqc2ouaeplxglzazh5atyu:
|
/vite-plugin-vue2/2.0.1_5jesfqc2ouaeplxglzazh5atyu:
|
||||||
@ -7517,6 +7524,100 @@ packages:
|
|||||||
- whiskers
|
- whiskers
|
||||||
dev: true
|
dev: true
|
||||||
|
|
||||||
|
/vite-plugin-vue2/2.0.1_rjze3w2zsgj4z24tnggj7hdbyq:
|
||||||
|
resolution: {integrity: sha512-8ixcIDZwk3PSbdaqKrPFYDot044lPLIqpjjuRXUDHdRhml87Kbc6JqLq6uwHERlPovwfI3DpluWRMVgn/Llmag==}
|
||||||
|
peerDependencies:
|
||||||
|
vite: ^2.0.0
|
||||||
|
vue-template-compiler: ^2.2.0
|
||||||
|
dependencies:
|
||||||
|
'@babel/core': 7.18.2
|
||||||
|
'@babel/parser': 7.18.4
|
||||||
|
'@babel/plugin-proposal-class-properties': 7.17.12_@babel+core@7.18.2
|
||||||
|
'@babel/plugin-proposal-decorators': 7.18.2_@babel+core@7.18.2
|
||||||
|
'@babel/plugin-proposal-nullish-coalescing-operator': 7.17.12_@babel+core@7.18.2
|
||||||
|
'@babel/plugin-proposal-object-rest-spread': 7.18.0_@babel+core@7.18.2
|
||||||
|
'@babel/plugin-proposal-optional-chaining': 7.17.12_@babel+core@7.18.2
|
||||||
|
'@babel/plugin-transform-arrow-functions': 7.17.12_@babel+core@7.18.2
|
||||||
|
'@babel/plugin-transform-block-scoping': 7.18.4_@babel+core@7.18.2
|
||||||
|
'@babel/plugin-transform-computed-properties': 7.17.12_@babel+core@7.18.2
|
||||||
|
'@babel/plugin-transform-destructuring': 7.18.0_@babel+core@7.18.2
|
||||||
|
'@babel/plugin-transform-parameters': 7.17.12_@babel+core@7.18.2
|
||||||
|
'@babel/plugin-transform-spread': 7.17.12_@babel+core@7.18.2
|
||||||
|
'@babel/plugin-transform-typescript': 7.18.4_@babel+core@7.18.2
|
||||||
|
'@rollup/pluginutils': 4.2.1
|
||||||
|
'@vue/babel-helper-vue-jsx-merge-props': 1.2.1
|
||||||
|
'@vue/babel-preset-jsx': 1.2.4_@babel+core@7.18.2
|
||||||
|
'@vue/component-compiler-utils': 3.3.0
|
||||||
|
consolidate: 0.16.0
|
||||||
|
debug: 4.3.4
|
||||||
|
fs-extra: 10.1.0
|
||||||
|
hash-sum: 2.0.0
|
||||||
|
magic-string: 0.26.2
|
||||||
|
prettier: 2.6.2
|
||||||
|
querystring: 0.2.1
|
||||||
|
rollup: 2.75.5
|
||||||
|
slash: 3.0.0
|
||||||
|
source-map: 0.7.4
|
||||||
|
vite: 2.9.13_sass@1.52.2
|
||||||
|
vue-template-babel-compiler: 1.2.0_ev5jzj74xu2fombjvobqpq452a
|
||||||
|
vue-template-compiler: 2.6.14
|
||||||
|
transitivePeerDependencies:
|
||||||
|
- arc-templates
|
||||||
|
- atpl
|
||||||
|
- babel-core
|
||||||
|
- bracket-template
|
||||||
|
- coffee-script
|
||||||
|
- dot
|
||||||
|
- dust
|
||||||
|
- dustjs-helpers
|
||||||
|
- dustjs-linkedin
|
||||||
|
- eco
|
||||||
|
- ect
|
||||||
|
- ejs
|
||||||
|
- haml-coffee
|
||||||
|
- hamlet
|
||||||
|
- hamljs
|
||||||
|
- handlebars
|
||||||
|
- hogan.js
|
||||||
|
- htmling
|
||||||
|
- jade
|
||||||
|
- jazz
|
||||||
|
- jqtpl
|
||||||
|
- just
|
||||||
|
- liquid-node
|
||||||
|
- liquor
|
||||||
|
- lodash
|
||||||
|
- marko
|
||||||
|
- mote
|
||||||
|
- mustache
|
||||||
|
- nunjucks
|
||||||
|
- plates
|
||||||
|
- pug
|
||||||
|
- qejs
|
||||||
|
- ractive
|
||||||
|
- razor-tmpl
|
||||||
|
- react
|
||||||
|
- react-dom
|
||||||
|
- slm
|
||||||
|
- squirrelly
|
||||||
|
- supports-color
|
||||||
|
- swig
|
||||||
|
- swig-templates
|
||||||
|
- teacup
|
||||||
|
- templayed
|
||||||
|
- then-jade
|
||||||
|
- then-pug
|
||||||
|
- tinyliquid
|
||||||
|
- toffee
|
||||||
|
- twig
|
||||||
|
- twing
|
||||||
|
- underscore
|
||||||
|
- vash
|
||||||
|
- velocityjs
|
||||||
|
- walrus
|
||||||
|
- whiskers
|
||||||
|
dev: true
|
||||||
|
|
||||||
/vite/2.9.10:
|
/vite/2.9.10:
|
||||||
resolution: {integrity: sha512-TwZRuSMYjpTurLqXspct+HZE7ONiW9d+wSWgvADGxhDPPyoIcNywY+RX4ng+QpK30DCa1l/oZgi2PLZDibhzbQ==}
|
resolution: {integrity: sha512-TwZRuSMYjpTurLqXspct+HZE7ONiW9d+wSWgvADGxhDPPyoIcNywY+RX4ng+QpK30DCa1l/oZgi2PLZDibhzbQ==}
|
||||||
engines: {node: '>=12.2.0'}
|
engines: {node: '>=12.2.0'}
|
||||||
@ -7541,8 +7642,32 @@ packages:
|
|||||||
fsevents: 2.3.2
|
fsevents: 2.3.2
|
||||||
dev: true
|
dev: true
|
||||||
|
|
||||||
/vite/2.9.10_sass@1.52.2:
|
/vite/2.9.13:
|
||||||
resolution: {integrity: sha512-TwZRuSMYjpTurLqXspct+HZE7ONiW9d+wSWgvADGxhDPPyoIcNywY+RX4ng+QpK30DCa1l/oZgi2PLZDibhzbQ==}
|
resolution: {integrity: sha512-AsOBAaT0AD7Mhe8DuK+/kE4aWYFMx/i0ZNi98hJclxb4e0OhQcZYUrvLjIaQ8e59Ui7txcvKMiJC1yftqpQoDw==}
|
||||||
|
engines: {node: '>=12.2.0'}
|
||||||
|
hasBin: true
|
||||||
|
peerDependencies:
|
||||||
|
less: '*'
|
||||||
|
sass: '*'
|
||||||
|
stylus: '*'
|
||||||
|
peerDependenciesMeta:
|
||||||
|
less:
|
||||||
|
optional: true
|
||||||
|
sass:
|
||||||
|
optional: true
|
||||||
|
stylus:
|
||||||
|
optional: true
|
||||||
|
dependencies:
|
||||||
|
esbuild: 0.14.42
|
||||||
|
postcss: 8.4.14
|
||||||
|
resolve: 1.22.0
|
||||||
|
rollup: 2.75.5
|
||||||
|
optionalDependencies:
|
||||||
|
fsevents: 2.3.2
|
||||||
|
dev: true
|
||||||
|
|
||||||
|
/vite/2.9.13_sass@1.52.2:
|
||||||
|
resolution: {integrity: sha512-AsOBAaT0AD7Mhe8DuK+/kE4aWYFMx/i0ZNi98hJclxb4e0OhQcZYUrvLjIaQ8e59Ui7txcvKMiJC1yftqpQoDw==}
|
||||||
engines: {node: '>=12.2.0'}
|
engines: {node: '>=12.2.0'}
|
||||||
hasBin: true
|
hasBin: true
|
||||||
peerDependencies:
|
peerDependencies:
|
||||||
|
@ -3,10 +3,12 @@
|
|||||||
"version": "1.0.2",
|
"version": "1.0.2",
|
||||||
"private": true,
|
"private": true,
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"dev:react": "npm run build && npm run serve",
|
"dev:react": "npm run entry && npm run build:lib & npm run dev:html",
|
||||||
"start": "node scripts/dev.js && vite",
|
"build": "npm run entry && vite build",
|
||||||
"build": "node scripts/build.js && vite build",
|
"serve": "vite preview",
|
||||||
"serve": "vite preview --port 8076"
|
"entry": "node scripts/build.js",
|
||||||
|
"build:lib": "vite build --mode lib",
|
||||||
|
"dev:html": "vite --port 8078"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@tmagic/schema": "1.0.2",
|
"@tmagic/schema": "1.0.2",
|
||||||
@ -24,6 +26,6 @@
|
|||||||
"@vitejs/plugin-react-refresh": "^1.3.1",
|
"@vitejs/plugin-react-refresh": "^1.3.1",
|
||||||
"recast": "^0.20.4",
|
"recast": "^0.20.4",
|
||||||
"typescript": "^4.3.4",
|
"typescript": "^4.3.4",
|
||||||
"vite": "^2.3.7"
|
"vite": "^ 2.9.13"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -20,16 +20,14 @@ import React from 'react';
|
|||||||
import ReactDOM from 'react-dom';
|
import ReactDOM from 'react-dom';
|
||||||
|
|
||||||
import Core from '@tmagic/core';
|
import Core from '@tmagic/core';
|
||||||
import { MApp } from '@tmagic/schema';
|
import type { MApp } from '@tmagic/schema';
|
||||||
import { RemoveData, SortEventData, UpdateData } from '@tmagic/stage';
|
import type { RemoveData, SortEventData, UpdateData } from '@tmagic/stage';
|
||||||
import { AppContent } from '@tmagic/ui-react';
|
import { AppContent } from '@tmagic/ui-react';
|
||||||
import { getUrlParam } from '@tmagic/utils';
|
import { getUrlParam } from '@tmagic/utils';
|
||||||
|
|
||||||
import App from './App';
|
import App from './App';
|
||||||
|
|
||||||
const componentUrl = '/tmagic-editor/playground/runtime/react/assets/components.js';
|
import('../comp-entry').then(() => {
|
||||||
|
|
||||||
import(componentUrl).then(() => {
|
|
||||||
const { components } = window.magicPresetComponents;
|
const { components } = window.magicPresetComponents;
|
||||||
|
|
||||||
const app = new Core({
|
const app = new Core({
|
||||||
|
@ -18,47 +18,76 @@
|
|||||||
|
|
||||||
import path from 'path';
|
import path from 'path';
|
||||||
|
|
||||||
import { defineConfig } from 'vite';
|
import { defineConfig, loadEnv } from 'vite';
|
||||||
import reactRefresh from '@vitejs/plugin-react-refresh';
|
import reactRefresh from '@vitejs/plugin-react-refresh';
|
||||||
|
|
||||||
// https://vitejs.dev/config/
|
export default defineConfig(({ command, mode }) => {
|
||||||
export default defineConfig({
|
const { WATCH_INCLUDE = '' } = loadEnv(mode, process.cwd(), '');
|
||||||
base: '/tmagic-editor/playground/runtime/react',
|
const libInput = {
|
||||||
plugins: [reactRefresh()],
|
config: './src/config-entry.ts',
|
||||||
|
value: './src/value-entry.ts',
|
||||||
|
event: './src/event-entry.ts',
|
||||||
|
};
|
||||||
|
|
||||||
resolve: {
|
const htmlInput = {
|
||||||
alias: [
|
page: './page.html',
|
||||||
{ find: /^react$/, replacement: path.join(__dirname, 'node_modules/react/index.js') },
|
playground: './playground.html',
|
||||||
{ find: /^react-dom$/, replacement: path.join(__dirname, 'node_modules/react-dom/index.js') },
|
};
|
||||||
{ find: /^@tmagic\/ui-react/, replacement: path.join(__dirname, '../../packages/ui-react/src/index.ts') },
|
|
||||||
{ find: /^@tmagic\/utils/, replacement: path.join(__dirname, '../../packages/utils/src/index.ts') },
|
|
||||||
{ find: /^@tmagic\/core/, replacement: path.join(__dirname, '../../packages/core/src/index.ts') },
|
|
||||||
{ find: /^@tmagic\/schema/, replacement: path.join(__dirname, '../../packages/schema/src/index.ts') },
|
|
||||||
],
|
|
||||||
},
|
|
||||||
|
|
||||||
server: {
|
const devInput = mode === 'lib' ? libInput : htmlInput;
|
||||||
host: '0.0.0.0',
|
|
||||||
port: 8090,
|
|
||||||
},
|
|
||||||
|
|
||||||
build: {
|
const buildConfig = {
|
||||||
sourcemap: true,
|
sourcemap: true,
|
||||||
|
|
||||||
cssCodeSplit: false,
|
cssCodeSplit: false,
|
||||||
|
|
||||||
rollupOptions: {
|
rollupOptions: {
|
||||||
input: {
|
input:
|
||||||
page: './page.html',
|
command === 'build' && mode !== 'lib'
|
||||||
playground: './playground.html',
|
? {
|
||||||
components: './src/comp-entry.ts',
|
...htmlInput,
|
||||||
config: './src/config-entry.ts',
|
...libInput,
|
||||||
value: './src/value-entry.ts',
|
}
|
||||||
event: './src/event-entry.ts',
|
: devInput,
|
||||||
},
|
|
||||||
output: {
|
output: {
|
||||||
entryFileNames: 'assets/[name].js',
|
entryFileNames: 'assets/[name].js',
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
};
|
||||||
|
|
||||||
|
if (mode === 'lib') {
|
||||||
|
return {
|
||||||
|
build: {
|
||||||
|
...buildConfig,
|
||||||
|
watch: {
|
||||||
|
include: WATCH_INCLUDE.split(','),
|
||||||
|
},
|
||||||
|
},
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
return {
|
||||||
|
base: '/tmagic-editor/playground/runtime/react',
|
||||||
|
|
||||||
|
plugins: [reactRefresh()],
|
||||||
|
|
||||||
|
resolve: {
|
||||||
|
alias: [
|
||||||
|
{ find: /^react$/, replacement: path.join(__dirname, 'node_modules/react/index.js') },
|
||||||
|
{ find: /^react-dom$/, replacement: path.join(__dirname, 'node_modules/react-dom/index.js') },
|
||||||
|
{ find: /^@tmagic\/ui-react/, replacement: path.join(__dirname, '../../packages/ui-react/src/index.ts') },
|
||||||
|
{ find: /^@tmagic\/utils/, replacement: path.join(__dirname, '../../packages/utils/src/index.ts') },
|
||||||
|
{ find: /^@tmagic\/core/, replacement: path.join(__dirname, '../../packages/core/src/index.ts') },
|
||||||
|
{ find: /^@tmagic\/schema/, replacement: path.join(__dirname, '../../packages/schema/src/index.ts') },
|
||||||
|
],
|
||||||
|
},
|
||||||
|
|
||||||
|
publicDir: command === 'serve' ? 'dist' : 'public',
|
||||||
|
|
||||||
|
server: {
|
||||||
|
host: '0.0.0.0',
|
||||||
|
},
|
||||||
|
|
||||||
|
build: buildConfig,
|
||||||
|
};
|
||||||
});
|
});
|
||||||
|
14
runtime/vue2/package-lock.json
generated
14
runtime/vue2/package-lock.json
generated
@ -20,7 +20,7 @@
|
|||||||
"rollup": "^2.25.0",
|
"rollup": "^2.25.0",
|
||||||
"rollup-plugin-external-globals": "^0.6.1",
|
"rollup-plugin-external-globals": "^0.6.1",
|
||||||
"sass": "^1.35.1",
|
"sass": "^1.35.1",
|
||||||
"vite": "^2.3.7",
|
"vite": "^ 2.9.13",
|
||||||
"vite-plugin-vue2": "^2.0.1",
|
"vite-plugin-vue2": "^2.0.1",
|
||||||
"vue-template-compiler": "^2.6.14"
|
"vue-template-compiler": "^2.6.14"
|
||||||
}
|
}
|
||||||
@ -2648,9 +2648,9 @@
|
|||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
"node_modules/vite": {
|
"node_modules/vite": {
|
||||||
"version": "2.9.10",
|
"version": "2.9.13",
|
||||||
"resolved": "https://registry.npmjs.org/vite/-/vite-2.9.10.tgz",
|
"resolved": "https://registry.npmjs.org/vite/-/vite-2.9.13.tgz",
|
||||||
"integrity": "sha512-TwZRuSMYjpTurLqXspct+HZE7ONiW9d+wSWgvADGxhDPPyoIcNywY+RX4ng+QpK30DCa1l/oZgi2PLZDibhzbQ==",
|
"integrity": "sha512-AsOBAaT0AD7Mhe8DuK+/kE4aWYFMx/i0ZNi98hJclxb4e0OhQcZYUrvLjIaQ8e59Ui7txcvKMiJC1yftqpQoDw==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"esbuild": "^0.14.27",
|
"esbuild": "^0.14.27",
|
||||||
@ -4676,9 +4676,9 @@
|
|||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
"vite": {
|
"vite": {
|
||||||
"version": "2.9.10",
|
"version": "2.9.13",
|
||||||
"resolved": "https://registry.npmjs.org/vite/-/vite-2.9.10.tgz",
|
"resolved": "https://registry.npmjs.org/vite/-/vite-2.9.13.tgz",
|
||||||
"integrity": "sha512-TwZRuSMYjpTurLqXspct+HZE7ONiW9d+wSWgvADGxhDPPyoIcNywY+RX4ng+QpK30DCa1l/oZgi2PLZDibhzbQ==",
|
"integrity": "sha512-AsOBAaT0AD7Mhe8DuK+/kE4aWYFMx/i0ZNi98hJclxb4e0OhQcZYUrvLjIaQ8e59Ui7txcvKMiJC1yftqpQoDw==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"requires": {
|
"requires": {
|
||||||
"esbuild": "^0.14.27",
|
"esbuild": "^0.14.27",
|
||||||
|
@ -3,10 +3,12 @@
|
|||||||
"version": "1.0.2",
|
"version": "1.0.2",
|
||||||
"private": true,
|
"private": true,
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"dev:vue2": "npm run build && npm run serve",
|
"dev:vue2": "npm run entry && npm run build:lib & npm run dev:html",
|
||||||
"start": "node scripts/dev.js && vite",
|
"build": "npm run entry && vite build",
|
||||||
"build": "node scripts/build.js && vite build",
|
"serve": "vite preview",
|
||||||
"serve": "vite preview --port 8077"
|
"entry": "node scripts/build.js",
|
||||||
|
"build:lib": "vite build --mode lib",
|
||||||
|
"dev:html": "vite --port 8078"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@tmagic/schema": "1.0.2",
|
"@tmagic/schema": "1.0.2",
|
||||||
@ -21,7 +23,7 @@
|
|||||||
"rollup": "^2.25.0",
|
"rollup": "^2.25.0",
|
||||||
"rollup-plugin-external-globals": "^0.6.1",
|
"rollup-plugin-external-globals": "^0.6.1",
|
||||||
"sass": "^1.35.1",
|
"sass": "^1.35.1",
|
||||||
"vite": "^2.3.7",
|
"vite": "^ 2.9.13",
|
||||||
"vite-plugin-vue2": "^2.0.1",
|
"vite-plugin-vue2": "^2.0.1",
|
||||||
"vue-template-compiler": "^2.6.14"
|
"vue-template-compiler": "^2.6.14"
|
||||||
}
|
}
|
||||||
|
@ -20,9 +20,7 @@ import Vue from 'vue';
|
|||||||
|
|
||||||
import App from './App.vue';
|
import App from './App.vue';
|
||||||
|
|
||||||
const componentUrl = '/tmagic-editor/playground/runtime/vue2/assets/components.js';
|
import('../comp-entry').then(() => {
|
||||||
|
|
||||||
import(componentUrl).then(() => {
|
|
||||||
const { components, plugins } = window.magicPresetComponents;
|
const { components, plugins } = window.magicPresetComponents;
|
||||||
|
|
||||||
Object.values(components).forEach((component: any) => {
|
Object.values(components).forEach((component: any) => {
|
||||||
|
@ -18,47 +18,78 @@
|
|||||||
|
|
||||||
import path from 'path';
|
import path from 'path';
|
||||||
|
|
||||||
import { defineConfig } from 'vite';
|
import { defineConfig, loadEnv } from 'vite';
|
||||||
import { createVuePlugin } from 'vite-plugin-vue2';
|
import { createVuePlugin } from 'vite-plugin-vue2';
|
||||||
// @ts-ignore
|
// @ts-ignore
|
||||||
import externalGlobals from 'rollup-plugin-external-globals';
|
import externalGlobals from 'rollup-plugin-external-globals';
|
||||||
|
|
||||||
export default defineConfig({
|
export default defineConfig(({ command, mode }) => {
|
||||||
base: '/tmagic-editor/playground/runtime/vue2',
|
const { WATCH_INCLUDE = '' } = loadEnv(mode, process.cwd(), '');
|
||||||
plugins: [createVuePlugin(), externalGlobals({ vue: 'Vue' }, { exclude: ['page.html', 'playground.html'] })],
|
const libInput = {
|
||||||
|
config: './src/config-entry.ts',
|
||||||
|
value: './src/value-entry.ts',
|
||||||
|
event: './src/event-entry.ts',
|
||||||
|
};
|
||||||
|
|
||||||
resolve: {
|
const htmlInput = {
|
||||||
alias: [
|
page: './page.html',
|
||||||
{ find: /^vue$/, replacement: path.join(__dirname, 'node_modules/vue/dist/vue.esm.js') },
|
playground: './playground.html',
|
||||||
{ find: /^@vue\/composition-api$/, replacement: path.join(__dirname, 'node_modules/@vue/composition-api') },
|
};
|
||||||
{ find: /^@tmagic\/ui-vue2/, replacement: path.join(__dirname, '../../packages/ui-vue2/src/index.ts') },
|
|
||||||
{ find: /^@tmagic\/utils/, replacement: path.join(__dirname, '../../packages/utils/src/index.ts') },
|
|
||||||
{ find: /^@tmagic\/core/, replacement: path.join(__dirname, '../../packages/core/src/index.ts') },
|
|
||||||
{ find: /^@tmagic\/schema/, replacement: path.join(__dirname, '../../packages/schema/src/index.ts') },
|
|
||||||
],
|
|
||||||
},
|
|
||||||
|
|
||||||
server: {
|
const devInput = mode === 'lib' ? libInput : htmlInput;
|
||||||
host: '0.0.0.0',
|
|
||||||
port: 8089,
|
const buildConfig = {
|
||||||
},
|
|
||||||
build: {
|
|
||||||
sourcemap: true,
|
sourcemap: true,
|
||||||
|
|
||||||
cssCodeSplit: false,
|
cssCodeSplit: false,
|
||||||
|
|
||||||
rollupOptions: {
|
rollupOptions: {
|
||||||
input: {
|
input:
|
||||||
page: './page.html',
|
command === 'build' && mode !== 'lib'
|
||||||
playground: './playground.html',
|
? {
|
||||||
components: './src/comp-entry.ts',
|
...htmlInput,
|
||||||
config: './src/config-entry.ts',
|
...libInput,
|
||||||
value: './src/value-entry.ts',
|
}
|
||||||
event: './src/event-entry.ts',
|
: devInput,
|
||||||
},
|
|
||||||
output: {
|
output: {
|
||||||
entryFileNames: 'assets/[name].js',
|
entryFileNames: 'assets/[name].js',
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
};
|
||||||
|
|
||||||
|
if (mode === 'lib') {
|
||||||
|
return {
|
||||||
|
build: {
|
||||||
|
...buildConfig,
|
||||||
|
watch: {
|
||||||
|
include: WATCH_INCLUDE.split(','),
|
||||||
|
},
|
||||||
|
},
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
return {
|
||||||
|
base: '/tmagic-editor/playground/runtime/vue2',
|
||||||
|
|
||||||
|
plugins: [createVuePlugin(), externalGlobals({ vue: 'Vue' }, { exclude: ['page.html', 'playground.html'] })],
|
||||||
|
|
||||||
|
resolve: {
|
||||||
|
alias: [
|
||||||
|
{ find: /^vue$/, replacement: path.join(__dirname, 'node_modules/vue/dist/vue.esm.js') },
|
||||||
|
{ find: /^@vue\/composition-api$/, replacement: path.join(__dirname, 'node_modules/@vue/composition-api') },
|
||||||
|
{ find: /^@tmagic\/ui-vue2/, replacement: path.join(__dirname, '../../packages/ui-vue2/src/index.ts') },
|
||||||
|
{ find: /^@tmagic\/utils/, replacement: path.join(__dirname, '../../packages/utils/src/index.ts') },
|
||||||
|
{ find: /^@tmagic\/core/, replacement: path.join(__dirname, '../../packages/core/src/index.ts') },
|
||||||
|
{ find: /^@tmagic\/schema/, replacement: path.join(__dirname, '../../packages/schema/src/index.ts') },
|
||||||
|
],
|
||||||
|
},
|
||||||
|
|
||||||
|
publicDir: command === 'serve' ? 'dist' : 'public',
|
||||||
|
|
||||||
|
server: {
|
||||||
|
host: '0.0.0.0',
|
||||||
|
},
|
||||||
|
|
||||||
|
build: buildConfig,
|
||||||
|
};
|
||||||
});
|
});
|
||||||
|
@ -3,10 +3,12 @@
|
|||||||
"version": "1.0.2",
|
"version": "1.0.2",
|
||||||
"private": true,
|
"private": true,
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"dev": "npm run build && npm run serve",
|
"dev": "npm run entry && npm run build:lib & npm run dev:html",
|
||||||
"start": "node scripts/dev.js && vite",
|
"build": "npm run entry && vite build",
|
||||||
"build": "node scripts/build.js && vite build",
|
"serve": "vite preview",
|
||||||
"serve": "vite preview --port 8078"
|
"entry": "node scripts/build.js",
|
||||||
|
"build:lib": "vite build --mode lib",
|
||||||
|
"dev:html": "vite --port 8078"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@tmagic/schema": "1.0.2",
|
"@tmagic/schema": "1.0.2",
|
||||||
@ -16,7 +18,7 @@
|
|||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@types/node": "^15.12.4",
|
"@types/node": "^15.12.4",
|
||||||
"@vitejs/plugin-vue": "^1.2.3",
|
"@vitejs/plugin-vue": "^2.3.3",
|
||||||
"@vue/compiler-sfc": "^3.2.0",
|
"@vue/compiler-sfc": "^3.2.0",
|
||||||
"@vue/test-utils": "^2.0.0",
|
"@vue/test-utils": "^2.0.0",
|
||||||
"recast": "^0.20.4",
|
"recast": "^0.20.4",
|
||||||
@ -24,7 +26,7 @@
|
|||||||
"rollup-plugin-external-globals": "^0.6.1",
|
"rollup-plugin-external-globals": "^0.6.1",
|
||||||
"sass": "^1.35.1",
|
"sass": "^1.35.1",
|
||||||
"typescript": "^4.3.4",
|
"typescript": "^4.3.4",
|
||||||
"vite": "^2.3.7",
|
"vite": "^ 2.9.13",
|
||||||
"vue-tsc": "^0.38.2"
|
"vue-tsc": "^0.38.2"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -20,11 +20,9 @@ import { createApp } from 'vue';
|
|||||||
|
|
||||||
import App from './App.vue';
|
import App from './App.vue';
|
||||||
|
|
||||||
const componentUrl = '/tmagic-editor/playground/runtime/vue3/assets/components.js';
|
import('../comp-entry').then((entry) => {
|
||||||
|
const { components, plugins } = entry.default;
|
||||||
import(componentUrl).then(() => {
|
|
||||||
const magicApp = createApp(App);
|
const magicApp = createApp(App);
|
||||||
const { components, plugins } = window.magicPresetComponents;
|
|
||||||
|
|
||||||
Object.values(components).forEach((component: any) => {
|
Object.values(components).forEach((component: any) => {
|
||||||
magicApp.component(component.name, component);
|
magicApp.component(component.name, component);
|
||||||
|
@ -18,46 +18,78 @@
|
|||||||
|
|
||||||
import path from 'path';
|
import path from 'path';
|
||||||
|
|
||||||
import { defineConfig } from 'vite';
|
import { defineConfig, loadEnv } from 'vite';
|
||||||
import vue from '@vitejs/plugin-vue';
|
import vue from '@vitejs/plugin-vue';
|
||||||
|
// @ts-ignore
|
||||||
import vueJsx from '@vitejs/plugin-vue-jsx';
|
import vueJsx from '@vitejs/plugin-vue-jsx';
|
||||||
// @ts-ignore
|
// @ts-ignore
|
||||||
import externalGlobals from 'rollup-plugin-external-globals';
|
import externalGlobals from 'rollup-plugin-external-globals';
|
||||||
|
|
||||||
export default defineConfig({
|
export default defineConfig(({ command, mode }) => {
|
||||||
base: '/tmagic-editor/playground/runtime/vue3',
|
const { WATCH_INCLUDE = '' } = loadEnv(mode, process.cwd(), '');
|
||||||
plugins: [vue(), vueJsx(), externalGlobals({ vue: 'Vue' }, { exclude: ['page.html', 'playground.html'] })],
|
const libInput = {
|
||||||
|
config: './src/config-entry.ts',
|
||||||
|
value: './src/value-entry.ts',
|
||||||
|
event: './src/event-entry.ts',
|
||||||
|
};
|
||||||
|
|
||||||
resolve: {
|
const htmlInput = {
|
||||||
alias: [
|
page: './page.html',
|
||||||
{ find: /^vue$/, replacement: path.join(__dirname, 'node_modules/vue/dist/vue.esm-bundler.js') },
|
playground: './playground.html',
|
||||||
{ find: /^@tmagic\/utils/, replacement: path.join(__dirname, '../../packages/utils/src/index.ts') },
|
};
|
||||||
{ find: /^@tmagic\/core/, replacement: path.join(__dirname, '../../packages/core/src/index.ts') },
|
|
||||||
{ find: /^@tmagic\/schema/, replacement: path.join(__dirname, '../../packages/schema/src/index.ts') },
|
|
||||||
],
|
|
||||||
},
|
|
||||||
|
|
||||||
server: {
|
const devInput = mode === 'lib' ? libInput : htmlInput;
|
||||||
host: '0.0.0.0',
|
|
||||||
port: 8089,
|
const buildConfig = {
|
||||||
},
|
|
||||||
build: {
|
|
||||||
sourcemap: true,
|
sourcemap: true,
|
||||||
|
|
||||||
cssCodeSplit: false,
|
cssCodeSplit: false,
|
||||||
|
|
||||||
rollupOptions: {
|
rollupOptions: {
|
||||||
input: {
|
input:
|
||||||
page: './page.html',
|
command === 'build' && mode !== 'lib'
|
||||||
playground: './playground.html',
|
? {
|
||||||
components: './src/comp-entry.ts',
|
...htmlInput,
|
||||||
config: './src/config-entry.ts',
|
...libInput,
|
||||||
value: './src/value-entry.ts',
|
}
|
||||||
event: './src/event-entry.ts',
|
: devInput,
|
||||||
},
|
|
||||||
output: {
|
output: {
|
||||||
entryFileNames: 'assets/[name].js',
|
entryFileNames: 'assets/[name].js',
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
};
|
||||||
|
|
||||||
|
if (mode === 'lib') {
|
||||||
|
return {
|
||||||
|
build: {
|
||||||
|
...buildConfig,
|
||||||
|
watch: {
|
||||||
|
include: WATCH_INCLUDE.split(','),
|
||||||
|
},
|
||||||
|
},
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
return {
|
||||||
|
base: '/tmagic-editor/playground/runtime/vue3',
|
||||||
|
|
||||||
|
plugins: [vue(), vueJsx(), externalGlobals({ vue: 'Vue' }, { exclude: ['page.html', 'playground.html'] })],
|
||||||
|
|
||||||
|
resolve: {
|
||||||
|
alias: [
|
||||||
|
{ find: /^vue$/, replacement: path.join(__dirname, 'node_modules/vue/dist/vue.esm-bundler.js') },
|
||||||
|
{ find: /^@tmagic\/utils/, replacement: path.join(__dirname, '../../packages/utils/src/index.ts') },
|
||||||
|
{ find: /^@tmagic\/core/, replacement: path.join(__dirname, '../../packages/core/src/index.ts') },
|
||||||
|
{ find: /^@tmagic\/schema/, replacement: path.join(__dirname, '../../packages/schema/src/index.ts') },
|
||||||
|
],
|
||||||
|
},
|
||||||
|
|
||||||
|
publicDir: command === 'serve' ? 'dist' : 'public',
|
||||||
|
|
||||||
|
server: {
|
||||||
|
host: '0.0.0.0',
|
||||||
|
},
|
||||||
|
|
||||||
|
build: buildConfig,
|
||||||
|
};
|
||||||
});
|
});
|
||||||
|
Loading…
x
Reference in New Issue
Block a user