wyt-cli 1.0.9 → 1.0.11
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/bin/commands/create.js +6 -6
- package/package.json +1 -1
package/bin/commands/create.js
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
import path from 'path';
|
|
4
4
|
// import { require } from '../lib/utils.js';
|
|
5
|
-
import { log_error, log_info, log_success
|
|
5
|
+
import { log_error, log_info, log_success } from '../lib/logger.js';
|
|
6
6
|
|
|
7
7
|
// 外部依赖
|
|
8
8
|
import { Command } from 'commander';
|
|
@@ -162,8 +162,8 @@ async function createProject(projectName, options) {
|
|
|
162
162
|
// 执行所有渲染任务
|
|
163
163
|
Promise.all(renderTasks);
|
|
164
164
|
|
|
165
|
-
// 更新 root ->
|
|
166
|
-
|
|
165
|
+
// 更新 root -> project.json -> apps 配置
|
|
166
|
+
updateRootProjectJson(projectName, options);
|
|
167
167
|
}
|
|
168
168
|
|
|
169
169
|
// 检测已有项目信息
|
|
@@ -241,9 +241,9 @@ async function checkProjectInfo(options) {
|
|
|
241
241
|
return results;
|
|
242
242
|
}
|
|
243
243
|
|
|
244
|
-
// 更新 root ->
|
|
245
|
-
async function
|
|
246
|
-
const appsConfigPath = path.join(process.cwd(), '
|
|
244
|
+
// 更新 root -> project.json -> apps 配置
|
|
245
|
+
async function updateRootProjectJson(projectName, options) {
|
|
246
|
+
const appsConfigPath = path.join(process.cwd(), 'project.json');
|
|
247
247
|
|
|
248
248
|
try {
|
|
249
249
|
// 读取配置
|