@aiot-toolkit/aiotpack 2.0.5-beta.20 → 2.0.5-beta.21

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.
@@ -166,7 +166,8 @@ class UxAfterCompile {
166
166
  projectPath,
167
167
  sourceRoot,
168
168
  outputPath,
169
- completeFeature
169
+ completeFeature,
170
+ startPage
170
171
  } = compilerOption;
171
172
  const content = _UxFileUtils.default.getManifestInfo(projectPath, sourceRoot);
172
173
  const translateCache = context.translateCache;
@@ -177,6 +178,15 @@ class UxAfterCompile {
177
178
  content.packageInfo = _ZipUtil.default.createComment(compilerOption);
178
179
  }
179
180
 
181
+ // 如果有startPage,且feature中没有router,则添加router
182
+ const routerFeature = 'system.router';
183
+ if (startPage && !content.features?.find(item => item.name === routerFeature)) {
184
+ content.features = content.features || [];
185
+ content.features.push({
186
+ name: routerFeature
187
+ });
188
+ }
189
+
180
190
  // feature
181
191
  if (translateCache?.featureCache.size) {
182
192
  // 消息提示
@@ -71,6 +71,10 @@ interface IJavascriptCompileOption extends ICompileParam {
71
71
  * @example log,warn
72
72
  */
73
73
  dropConsole?: boolean | string;
74
+ /**
75
+ * 启动页
76
+ */
77
+ startPage?: string;
74
78
  /**
75
79
  * 获取远程证书
76
80
  */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aiot-toolkit/aiotpack",
3
- "version": "2.0.5-beta.20",
3
+ "version": "2.0.5-beta.21",
4
4
  "description": "The process tool for packaging aiot projects.",
5
5
  "keywords": [
6
6
  "aiotpack"
@@ -19,14 +19,14 @@
19
19
  "test": "node ./__tests__/aiotpack.test.js"
20
20
  },
21
21
  "dependencies": {
22
- "@aiot-toolkit/generator": "2.0.5-beta.20",
23
- "@aiot-toolkit/parser": "2.0.5-beta.20",
24
- "@aiot-toolkit/shared-utils": "2.0.5-beta.20",
22
+ "@aiot-toolkit/generator": "2.0.5-beta.21",
23
+ "@aiot-toolkit/parser": "2.0.5-beta.21",
24
+ "@aiot-toolkit/shared-utils": "2.0.5-beta.21",
25
25
  "@hap-toolkit/aaptjs": "^2.0.0",
26
26
  "@rspack/core": "^1.3.9",
27
27
  "aiot-parse5": "^1.0.2",
28
28
  "babel-loader": "^9.1.3",
29
- "file-lane": "2.0.5-beta.20",
29
+ "file-lane": "2.0.5-beta.21",
30
30
  "file-loader": "^6.2.0",
31
31
  "fs-extra": "^11.2.0",
32
32
  "hap-toolkit": "^2.0.0",
@@ -43,5 +43,5 @@
43
43
  "@types/jsrsasign": "^10.5.12",
44
44
  "@types/webpack-sources": "^3.2.3"
45
45
  },
46
- "gitHead": "e34506862fb5e24eb86b4a4aa67fa88bb76f6114"
46
+ "gitHead": "bd68bd780bf1d12ca6f2bb4179b2759316d958a7"
47
47
  }