@htyf-mp/cli 0.2.18 → 0.2.19

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@htyf-mp/cli",
3
- "version": "0.2.18",
3
+ "version": "0.2.19",
4
4
  "description": "红糖云服app小程序模板-cli",
5
5
  "type": "module",
6
6
  "bin": {
@@ -192,7 +192,18 @@ export class ProjectInitializer {
192
192
  // 生成配置
193
193
  spinner.text = '正在生成项目配置...';
194
194
  const appid = this.config.generateAppId();
195
- const projectConfig = this.config.createProjectConfig(appName, displayName, appid, isGodot ? 'landscape' : 'portrait');
195
+ const projectConfig = this.config.createProjectConfig(appName, displayName, appid, 'portrait');
196
+
197
+ // 根据模板类型设置 htyf.type(app / game / web)
198
+ let appType = 'app';
199
+ if (templateType === CONSTANTS.TEMPLATE_TYPES.GAME_TEMPLATE) {
200
+ appType = 'game';
201
+ } else if (templateType === CONSTANTS.TEMPLATE_TYPES.WEB_TEMPLATE) {
202
+ appType = 'web';
203
+ } else if (templateType === CONSTANTS.TEMPLATE_TYPES.APP_TEMPLATE) {
204
+ appType = 'app';
205
+ }
206
+ projectConfig.type = appType;
196
207
  // 写入配置文件
197
208
  const configPath = path.join(appRootPath, 'app.json');
198
209
  let existingConfig = {};