feat: 去除sample

This commit is contained in:
chenchun
2024-11-08 11:10:45 +08:00
parent d5ca8ddf1e
commit f9a018638b
49 changed files with 58 additions and 858 deletions

View File

@@ -31,7 +31,7 @@ namespace Yi.Abp.Tool.Commands
var pathOption = application.Option("-p|--path", "创建路径", CommandOptionType.SingleValue);
var csfOption = application.Option("-csf", "是否创建解决方案文件夹", CommandOptionType.NoValue);
var soureOption = application.Option("-s|--soure", "模板来源gitee模板库分支名称: 默认值`defualt`",
var soureOption = application.Option("-s|--soure", "模板来源gitee模板库分支名称: 默认值`default`",
CommandOptionType.SingleValue);
var moduleNameArgument = application.Argument("moduleName", "模块名", (_) => { });
@@ -56,13 +56,27 @@ namespace Yi.Abp.Tool.Commands
application.OnExecute(() =>
{
var path = string.Empty;
if (pathOption.HasValue())
{
path = pathOption.Value();
if (!Directory.Exists(path))
{
Directory.CreateDirectory(path);
return 0;
}
}
#region
var id = Guid.NewGuid().ToString("N");
var zipPath = string.Empty;
byte[] fileByteArray;
var soure= soureOption.HasValue() ? soureOption.Value() : "defualt";
var soure= soureOption.HasValue() ? soureOption.Value() : "default";
var templateType = templateTypeOption.HasValue() ? templateTypeOption.Value() : "module";
if (templateType == "module")
@@ -83,11 +97,7 @@ namespace Yi.Abp.Tool.Commands
}).Result;
}
var path = string.Empty;
if (pathOption.HasValue())
{
path = pathOption.Value();
}
zipPath = Path.Combine(path, $"{id}.zip");
File.WriteAllBytes(zipPath, fileByteArray);

View File

@@ -19,9 +19,9 @@ class Program
// args = ["clear"];
//创建模块
//args = ["new","oooo", "-t","module","-p","D:\\temp","-csf"];
args = ["new","oooo", "-t","module","-p","D:\\temp","-csf"];
//查看模板列表
args = ["new","list"];
//args = ["new","list"];
//添加模块
//args = ["add-module", "kkk"];

View File

@@ -15,8 +15,8 @@ namespace Yi.Abp.Tool
Configure<AbpRemoteServiceOptions>(options =>
{
options.RemoteServices.Default =
// new RemoteServiceConfiguration("https://ccnetcore.com:19009");
new RemoteServiceConfiguration("http://localhost:19002");
new RemoteServiceConfiguration("https://ccnetcore.com:19009");
// new RemoteServiceConfiguration("http://localhost:19002");
});
}
}