Update build
This commit is contained in:
@@ -8,24 +8,6 @@
|
|||||||
"fsdgencsharp"
|
"fsdgencsharp"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"fsdgenmd": {
|
|
||||||
"version": "2.8.0",
|
|
||||||
"commands": [
|
|
||||||
"fsdgenmd"
|
|
||||||
]
|
|
||||||
},
|
|
||||||
"fsdgenaspnet": {
|
|
||||||
"version": "3.9.0",
|
|
||||||
"commands": [
|
|
||||||
"fsdgenaspnet"
|
|
||||||
]
|
|
||||||
},
|
|
||||||
"fsdgenswagger": {
|
|
||||||
"version": "2.5.0",
|
|
||||||
"commands": [
|
|
||||||
"fsdgenswagger"
|
|
||||||
]
|
|
||||||
},
|
|
||||||
"fsdgenjs": {
|
"fsdgenjs": {
|
||||||
"version": "2.9.0",
|
"version": "2.9.0",
|
||||||
"commands": [
|
"commands": [
|
||||||
|
|||||||
@@ -1,3 +1,3 @@
|
|||||||
fsdgencsharp .\fsd\Oap.Api.v1.fsd ./src/OAP/Oap.Api.v1 --namespace Oap.Api.v1
|
fsdgencsharp .\fsd\Oap.Api.v1.fsd ./src/OAP/Oap.Api.v1 --namespace Oap.Api.v1 --clean --newline lf
|
||||||
fsdgenjs .\fsd\Oap.Api.v1.fsd ./src/OAP/Oap.Theme.Svelte/src/lib/oap --module OapApiV1Client --typescript
|
fsdgenjs .\fsd\Oap.Api.v1.fsd ./src/OAP/Oap.Theme.Svelte/src/lib/oap --module OapApiV1Client --typescript --newline lf
|
||||||
REM fsdgenaspnet .\fsd\OapApi.v1.fsd ./src/OAP/OapApi.v1 --target core --namespace OapApi.v1 --apinamespace OapApi.v1.Client
|
REM fsdgenaspnet .\fsd\OapApi.v1.fsd ./src/OAP/OapApi.v1 --target core --namespace OapApi.v1 --apinamespace OapApi.v1.Client
|
||||||
@@ -52,20 +52,16 @@ internal static class Build
|
|||||||
{
|
{
|
||||||
const string slash = "/";
|
const string slash = "/";
|
||||||
const string fsdFilePath = "fsd/Oap.Api.v1.fsd";
|
const string fsdFilePath = "fsd/Oap.Api.v1.fsd";
|
||||||
const string clientProject = "OapApi.v1.Client";
|
//const string clientProject = "Oap.Api.v1.Client";
|
||||||
const string webApiProject = "OapApi.v1";
|
const string webApiProject = "Oap.Api.v1";
|
||||||
|
|
||||||
var csharpCodeGenerator = DotNetLocalTool.Create("fsdgencsharp");
|
var csharpCodeGenerator = DotNetLocalTool.Create("fsdgencsharp");
|
||||||
var aspnetCodeGenerator = DotNetLocalTool.Create("fsdgenaspnet");
|
var jsCodeGenerator = DotNetLocalTool.Create("fsdgenjs");
|
||||||
var mdCodeGenerator = DotNetLocalTool.Create("fsdgenmd");
|
|
||||||
var swaggerCodeGenerator = DotNetLocalTool.Create("fsdgenswagger");
|
|
||||||
|
|
||||||
var verifyOption = verify ? "--verify" : null;
|
var verifyOption = verify ? "--verify" : null;
|
||||||
|
|
||||||
csharpCodeGenerator.Run(fsdFilePath, Path.Combine("src", clientProject) + slash, "--namespace", clientProject, "--clean", "--newline", "lf", verifyOption);
|
csharpCodeGenerator.Run(fsdFilePath, Path.Combine("src", "OAP", webApiProject) + slash, "--namespace", webApiProject, "--clean", "--newline", "lf", verifyOption);
|
||||||
aspnetCodeGenerator.Run(fsdFilePath, Path.Combine("src", "Modules", webApiProject, "Controllers"), "--namespace", $"{webApiProject}.Controllers", "--newline", "lf", verifyOption, "--target", "core");
|
jsCodeGenerator.Run(fsdFilePath, Path.Combine("src", "OAP", "Oap.Theme.Svelte", "src", "lib", "oap") + slash, "--module", "OapApiV1Client", "--typescript", "--newline", "lf", verifyOption);
|
||||||
mdCodeGenerator.Run(fsdFilePath, Path.Combine("docs", "api") + slash, "--clean", "--newline", "lf", verifyOption);
|
|
||||||
swaggerCodeGenerator.Run(fsdFilePath, Path.Combine("src", "Modules", webApiProject, "swagger.json"), "--json", "--newline", "lf", verifyOption);
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user