feat: 完成yi.tool.web爬虫

This commit is contained in:
橙子
2024-06-09 00:29:53 +08:00
parent f44a099469
commit f267d820bf
11 changed files with 144 additions and 10 deletions

View File

@@ -13,7 +13,13 @@ namespace Yi.Abp.Tool.Commands
public Task InvokerAsync(Dictionary<string, string> options, string[] args)
{
List<string> delDirBlacklist = ["obj", "bin"];
DeleteObjBinFolders("./", delDirBlacklist);
options.TryGetValue("path", out var path);
if (string.IsNullOrEmpty(path))
{
path = "./";
}
DeleteObjBinFolders(path, delDirBlacklist);
return Task.CompletedTask;
}
@@ -24,7 +30,7 @@ namespace Yi.Abp.Tool.Commands
{
foreach (string subDir in Directory.GetDirectories(directory))
{
if (delDirBlacklist.Contains(subDir))
if (delDirBlacklist.Contains(Path.GetFileName( subDir)))
{
Directory.Delete(subDir, true);
Console.WriteLine($"已删除文件夹:{subDir}");

View File

@@ -31,6 +31,7 @@ namespace Yi.Abp.Tool.Commands
> 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>] `
> clear: 清除当前目录及子目录下的obj、bin文件夹` yi-abp clear `
""");
return Task.CompletedTask;