@micro-zoe/micro-app 0.4.2 → 0.5.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +12 -57
- package/README.zh-cn.md +11 -54
- package/lib/index.d.ts +113 -28
- package/lib/index.esm.js +1691 -1621
- package/lib/index.esm.js.map +1 -1
- package/lib/index.min.js +1 -1
- package/lib/index.min.js.map +1 -1
- package/lib/index.umd.js +1 -1
- package/lib/index.umd.js.map +1 -1
- package/package.json +21 -25
- package/typings/global.d.ts +9 -0
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@micro-zoe/micro-app",
|
|
3
|
-
"version": "0.
|
|
4
|
-
"description": "A
|
|
3
|
+
"version": "0.5.2",
|
|
4
|
+
"description": "A lightweight, efficient and powerful micro front-end framework",
|
|
5
5
|
"private": false,
|
|
6
6
|
"main": "lib/index.min.js",
|
|
7
7
|
"module": "lib/index.esm.js",
|
|
@@ -17,24 +17,24 @@
|
|
|
17
17
|
"start:main-vue3-vite": "npm-run-all --parallel build:watch start-child:* main-vue3-vite",
|
|
18
18
|
"build:watch": "cross-env NODE_ENV='development' rollup -c -w",
|
|
19
19
|
"build": "cross-env NODE_ENV='production' rollup -c && npm run createtype && npm run afterbuild",
|
|
20
|
-
"install:main-react16": "cd
|
|
21
|
-
"install:main-vue2": "cd
|
|
22
|
-
"install:main-vue3-vite": "cd
|
|
23
|
-
"install:child-react16": "cd
|
|
24
|
-
"install:child-react17": "cd
|
|
25
|
-
"install:child-vue2": "cd
|
|
26
|
-
"install:child-vue3": "cd
|
|
27
|
-
"install:child-vite": "cd
|
|
28
|
-
"install:child-angular11": "cd
|
|
29
|
-
"main-react16": "cd
|
|
30
|
-
"main-vue2": "cd
|
|
31
|
-
"main-vue3-vite": "cd
|
|
32
|
-
"start-child:react16": "cd
|
|
33
|
-
"start-child:react17": "cd
|
|
34
|
-
"start-child:vue2": "cd
|
|
35
|
-
"start-child:vue3": "cd
|
|
36
|
-
"start-child:vite": "cd
|
|
37
|
-
"start-child:angular11": "cd
|
|
20
|
+
"install:main-react16": "cd dev/main-react16 && yarn",
|
|
21
|
+
"install:main-vue2": "cd dev/main-vue2 && yarn",
|
|
22
|
+
"install:main-vue3-vite": "cd dev/main-vue3-vite && yarn",
|
|
23
|
+
"install:child-react16": "cd dev/children/react16 && yarn",
|
|
24
|
+
"install:child-react17": "cd dev/children/react17 && yarn",
|
|
25
|
+
"install:child-vue2": "cd dev/children/vue2 && yarn",
|
|
26
|
+
"install:child-vue3": "cd dev/children/vue3 && yarn",
|
|
27
|
+
"install:child-vite": "cd dev/children/vite && yarn",
|
|
28
|
+
"install:child-angular11": "cd dev/children/angular11 && yarn",
|
|
29
|
+
"main-react16": "cd dev/main-react16 && yarn start",
|
|
30
|
+
"main-vue2": "cd dev/main-vue2 && yarn start",
|
|
31
|
+
"main-vue3-vite": "cd dev/main-vue3-vite && yarn start",
|
|
32
|
+
"start-child:react16": "cd dev/children/react16 && yarn start",
|
|
33
|
+
"start-child:react17": "cd dev/children/react17 && yarn start",
|
|
34
|
+
"start-child:vue2": "cd dev/children/vue2 && yarn start",
|
|
35
|
+
"start-child:vue3": "cd dev/children/vue3 && yarn start",
|
|
36
|
+
"start-child:vite": "cd dev/children/vite && yarn start",
|
|
37
|
+
"start-child:angular11": "cd dev/children/angular11 && yarn start",
|
|
38
38
|
"docs": "docsify serve docs --port 2000",
|
|
39
39
|
"lint": "eslint --cache '**/*.{js,ts}'",
|
|
40
40
|
"lint:fix": "yarn lint --fix",
|
|
@@ -43,8 +43,7 @@
|
|
|
43
43
|
"test:server": "node scripts/test_server.js --start",
|
|
44
44
|
"test": "jest",
|
|
45
45
|
"test:watch": "jest --watch",
|
|
46
|
-
"test:coverage": "jest --coverage"
|
|
47
|
-
"prepublishOnly": "yarn lint && yarn test && yarn build"
|
|
46
|
+
"test:coverage": "jest --coverage"
|
|
48
47
|
},
|
|
49
48
|
"repository": {
|
|
50
49
|
"type": "git",
|
|
@@ -82,9 +81,6 @@
|
|
|
82
81
|
]
|
|
83
82
|
},
|
|
84
83
|
"dependencies": {},
|
|
85
|
-
"peerDependencies": {
|
|
86
|
-
"@babel/runtime": ">=7.0.0"
|
|
87
|
-
},
|
|
88
84
|
"devDependencies": {
|
|
89
85
|
"@babel/core": "~7.12.10",
|
|
90
86
|
"@babel/plugin-transform-runtime": "~7.12.10",
|
package/typings/global.d.ts
CHANGED
|
@@ -30,6 +30,7 @@ declare module '@micro-app/types' {
|
|
|
30
30
|
defer: boolean // defer script
|
|
31
31
|
module: boolean // module type script
|
|
32
32
|
isGlobal?: boolean // share js to global
|
|
33
|
+
code2Function?: Function // code to Function
|
|
33
34
|
}
|
|
34
35
|
|
|
35
36
|
interface sourceType {
|
|
@@ -43,6 +44,7 @@ declare module '@micro-app/types' {
|
|
|
43
44
|
isPrefetch: boolean // whether prefetch app, default is false
|
|
44
45
|
name: string // app name
|
|
45
46
|
url: string // app url
|
|
47
|
+
ssrUrl: string // html path in ssr mode
|
|
46
48
|
container: HTMLElement | ShadowRoot | null // app container
|
|
47
49
|
inline: boolean // whether js runs in inline script mode, default is false
|
|
48
50
|
scopecss: boolean // whether use css scoped, default is true
|
|
@@ -77,6 +79,9 @@ declare module '@micro-app/types' {
|
|
|
77
79
|
|
|
78
80
|
// get app status
|
|
79
81
|
getAppStatus (): string
|
|
82
|
+
|
|
83
|
+
// actions for completely destroy
|
|
84
|
+
actionsForCompletelyDestory (): void
|
|
80
85
|
}
|
|
81
86
|
|
|
82
87
|
interface MicroAppElementType {
|
|
@@ -191,3 +196,7 @@ declare namespace JSX {
|
|
|
191
196
|
}
|
|
192
197
|
|
|
193
198
|
declare module '@micro-zoe/micro-app/polyfill/jsx-custom-event'
|
|
199
|
+
|
|
200
|
+
declare const __DEV__: boolean
|
|
201
|
+
|
|
202
|
+
declare const __TEST__: boolean
|