Files
Yi.Framework/Yi.Abp.Net8/tool/Yi.Abp.Tool/Commands/HelpCommand.cs
2024-06-05 20:28:53 +08:00

41 lines
1.5 KiB
C#
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
using System;
using System.Collections.Generic;
using System.Linq;
using System.Reflection;
using System.Text;
using System.Threading.Tasks;
namespace Yi.Abp.Tool.Commands
{
public class HelpCommand : ICommand
{
public List<string> CommandStrs => new List<string> { "h", "help", "-h", "-help" };
public Task InvokerAsync(Dictionary<string, string> options, string[] args)
{
string? errorMsg = null;
if (options.TryGetValue("error", out _))
{
errorMsg = "您输入的命令有误,请检查,以下帮助命令提示:";
}
Console.WriteLine($"""
{errorMsg}
使用:
yi-abp <command> <target> [options]
命令列表:
> v: 查看yi-abp工具版本号
> help: 查看帮助列表,写下命令` yi-abp help <command> `
> new: 创建模块模板` yi-abp new <name> -t module -csf `
> new: 创建项目模板` yi-abp new <name> -csf `
> add-module: 将内容添加到当前解决方案` yi-abp add-module <moduleName> -modulePath <path> [-s <slnPath>] `
- add例子yi-abp add-module Acme.Demo -s "D:\code\csharp\source\Yi\Yi.Abp.Net8" -modulePath "D:\\code\\csharp\\source\\Yi\\Yi.Abp.Net8\\module\\acme-demo"
""");
return Task.CompletedTask;
}
}
}