@micro-zoe/micro-app 0.8.4 → 0.8.7
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 +2 -2
- package/README.zh-cn.md +1 -1
- package/lib/index.esm.js +177 -78
- 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 +4 -2
- package/typings/global.d.ts +16 -2
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@micro-zoe/micro-app",
|
|
3
|
-
"version": "0.8.
|
|
3
|
+
"version": "0.8.7",
|
|
4
4
|
"description": "A lightweight, efficient and powerful micro front-end framework",
|
|
5
5
|
"private": false,
|
|
6
6
|
"main": "lib/index.min.js",
|
|
@@ -44,7 +44,9 @@
|
|
|
44
44
|
"test": "jest",
|
|
45
45
|
"test:watch": "jest --watch",
|
|
46
46
|
"test:coverage": "jest --coverage",
|
|
47
|
-
"
|
|
47
|
+
"test:unit": "jest src/__tests__/unit",
|
|
48
|
+
"test:unit:coverage": "npm run test:unit -- --coverage",
|
|
49
|
+
"prepublishOnly": "yarn build"
|
|
48
50
|
},
|
|
49
51
|
"repository": {
|
|
50
52
|
"type": "git",
|
package/typings/global.d.ts
CHANGED
|
@@ -126,6 +126,8 @@ declare module '@micro-app/types' {
|
|
|
126
126
|
error?(e?: CustomEvent): void
|
|
127
127
|
}
|
|
128
128
|
|
|
129
|
+
type AssetsChecker = (url: string) => boolean;
|
|
130
|
+
|
|
129
131
|
type plugins = {
|
|
130
132
|
// global plugin
|
|
131
133
|
global?: Array<{
|
|
@@ -133,10 +135,16 @@ declare module '@micro-app/types' {
|
|
|
133
135
|
scopeProperties?: Array<PropertyKey>
|
|
134
136
|
// Properties that can be escape to rawWindow
|
|
135
137
|
escapeProperties?: Array<PropertyKey>
|
|
138
|
+
// Exclude JS or CSS
|
|
139
|
+
excludeChecker?: AssetsChecker
|
|
140
|
+
// Ignore JS or CSS
|
|
141
|
+
ignoreChecker?: AssetsChecker
|
|
136
142
|
// options for plugin as the third parameter of loader
|
|
137
143
|
options?: unknown
|
|
138
144
|
// handle function
|
|
139
|
-
loader?: (code: string, url: string, options: unknown) => string
|
|
145
|
+
loader?: (code: string, url: string, options: unknown, info: sourceScriptInfo) => string
|
|
146
|
+
// html processor
|
|
147
|
+
processHtml?: (code: string, url: string, options: unknown) => string
|
|
140
148
|
}>
|
|
141
149
|
|
|
142
150
|
// plugin for special app
|
|
@@ -146,10 +154,16 @@ declare module '@micro-app/types' {
|
|
|
146
154
|
scopeProperties?: Array<PropertyKey>
|
|
147
155
|
// Properties that can be escape to rawWindow
|
|
148
156
|
escapeProperties?: Array<PropertyKey>
|
|
157
|
+
// Exclude JS or CSS
|
|
158
|
+
excludeChecker?: AssetsChecker
|
|
159
|
+
// Ignore JS or CSS
|
|
160
|
+
ignoreChecker?: AssetsChecker
|
|
149
161
|
// options for plugin as the third parameter of loader
|
|
150
162
|
options?: unknown
|
|
151
163
|
// handle function
|
|
152
|
-
loader?: (code: string, url: string, options: unknown) => string
|
|
164
|
+
loader?: (code: string, url: string, options: unknown, info: sourceScriptInfo) => string
|
|
165
|
+
// html processor
|
|
166
|
+
processHtml?: (code: string, url: string, options: unknown) => string
|
|
153
167
|
}>
|
|
154
168
|
}
|
|
155
169
|
}
|