wyt-cli 1.0.19 → 1.0.20

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.
@@ -1,7 +1,7 @@
1
1
  // commands/create.js
2
2
 
3
3
  import path from 'path';
4
- import { log_error, log_success, getPlainText, getInquirerOperationText } from '../lib/logger.js';
4
+ import { log_error, getInquirerOperationText } from '../lib/logger.js';
5
5
 
6
6
  // 外部依赖
7
7
  import { Command } from 'commander';
@@ -10,6 +10,7 @@ import { glob } from 'glob';
10
10
  import fs from 'fs-extra';
11
11
  // import ora from 'ora';
12
12
  import inquirer from 'inquirer';
13
+ import chalk from 'chalk';
13
14
  import ejs from 'ejs';
14
15
  import { checkTargetDir, getModuleMenuConfig, getProjectConfig } from '../lib/dir.js';
15
16
 
@@ -66,8 +67,14 @@ async function createProjectAction(projectName, options) {
66
67
 
67
68
  // 创建项目模版
68
69
  await createProject(projectName, options);
69
- log_success(
70
- `项目 ${projectName} 创建成功!\n\n${getPlainText('项目运行步骤:\n1. 请自行安装依赖 pnpm i\n2. 启动测试服务器 pnpm run dev')}\n\n`
70
+ console.log(
71
+ `\n\n${chalk.bgGreen.black(' 项目创建成功 ')} ${chalk.greenBright(projectName)}\n\n` +
72
+ `${chalk.cyan.bold('━━━━ 运行步骤 ━━━━')}\n` +
73
+ `${chalk.blue('1. 安装依赖')} ${chalk.yellow('pnpm install')}\n` +
74
+ `${chalk.blue('2. 启动开发服务器')} ${chalk.yellow('wyt-cli run')}\n\n` +
75
+ `${chalk.hex('#FFA500').bold('💡 注意事项:')}\n` +
76
+ `• 确保本地 ${chalk.yellow('Node.js >= 16.0 && pnpm 7.x+')} 版本\n` +
77
+ `• 建议使用 ${chalk.yellow('wyt-cli')} 命令行工具\n`
71
78
  );
72
79
  } catch (error) {
73
80
  log_error(error.message);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "wyt-cli",
3
- "version": "1.0.19",
3
+ "version": "1.0.20",
4
4
  "description": "HRP3.0 项目命令行工具",
5
5
  "main": "index.js",
6
6
  "bin": {