2021-07-12 18:11:23 +08:00
<Project Sdk= "Microsoft.NET.Sdk" >
<PropertyGroup >
2024-11-18 22:32:26 +08:00
<TargetFramework > net9.0</TargetFramework>
2021-07-12 18:11:23 +08:00
</PropertyGroup>
<Target Name= "DebugEnsureNodeEnv" BeforeTargets= "Build" Condition= " '$(Configuration)' == 'Debug' And !Exists('$(SolutionDir)node_modules') " >
<!-- Ensure Node.js is installed -->
<Exec Command= "node --version" ContinueOnError= "true" >
<Output TaskParameter= "ExitCode" PropertyName= "ErrorCode" />
</Exec>
<Error Condition= "'$(ErrorCode)' != '0'" Text= "Node.js is required to build and run this project. To continue, please install Node.js from https://nodejs.org/, and then restart your command prompt or IDE." />
<Message Importance= "high" Text= "Restoring dependencies using 'npm'. This may take several minutes..." />
<Exec WorkingDirectory= "$(SolutionDir)" Command= "npm install" />
</Target>
<Target Name= "DebugRunGulp" BeforeTargets= "DebugEnsureNodeEnv" Condition= " '$(Configuration)' == 'Debug' And Exists('$(SolutionDir)node_modules') " >
2022-06-04 00:44:34 +08:00
<Exec WorkingDirectory= "$(SolutionDir)" Command= "npm run build:lib" />
<Exec WorkingDirectory= "$(SolutionDir)" Command= "npm run build:doc" />
2021-07-12 18:11:23 +08:00
</Target>
<Target Name= "PublishRunGulp" AfterTargets= "ComputeFilesToPublish" >
<Exec WorkingDirectory= "$(SolutionDir)" Command= "npm install" />
2022-06-04 00:44:34 +08:00
<Exec WorkingDirectory= "$(SolutionDir)" Command= "npm run build:lib" />
<Exec WorkingDirectory= "$(SolutionDir)" Command= "npm run build:doc" />
2021-07-12 18:11:23 +08:00
</Target>
<PropertyGroup >
<CLIProjectDir > site/AntDesign.Docs.Build.CLI</CLIProjectDir>
<CLIPath > $(CLIProjectDir)/AntDesign.Docs.Build.CLI.csproj</CLIPath>
<ProjectDir > $(SolutionDir)/site/AntDesign.Docs</ProjectDir>
</PropertyGroup>
<ItemGroup >
<DocFiles Include= "$(SolutionDir)docs\**\*.*" />
<DocFiles Include= "$(SolutionDir)\CHANGELOG.*.*" />
</ItemGroup>
<Target Name= "RunCli" BeforeTargets= "Build" Condition= " '$(Configuration)' == 'Debug'" >
<Copy SourceFiles= "@(DocFiles)" DestinationFolder= "$(ProjectDir)\wwwroot\docs\%(RecursiveDir)" ContinueOnError= "true" />
2024-11-18 22:32:26 +08:00
<Exec WorkingDirectory= "$(SolutionDir)" Command= "dotnet run -f net9 --project $(CLIPath) demo2json $(ProjectDir)/Demos $(ProjectDir)/wwwroot/meta" />
<Exec WorkingDirectory= "$(SolutionDir)" Command= "dotnet run -f net9 --project $(CLIPath) menu2json $(ProjectDir)/Demos $(ProjectDir)/wwwroot/docs $(ProjectDir)/wwwroot/meta" />
<Exec WorkingDirectory= "$(SolutionDir)" Command= "dotnet run -f net9 --project $(CLIPath) docs2html $(ProjectDir)/wwwroot/docs ./site/AntDesign.Docs/wwwroot/docs" />
2021-07-12 18:11:23 +08:00
</Target>
</Project>