2020-02-15 18:22:51 +08:00
<Project Sdk= "Microsoft.NET.Sdk.Razor" >
2019-12-04 16:46:08 +08:00
<PropertyGroup >
2020-11-14 23:44:48 +08:00
<TargetFrameworks > netcoreapp3.1;net5</TargetFrameworks>
2020-11-09 22:17:27 +08:00
<LangVersion > 9.0</LangVersion>
2019-12-04 16:46:08 +08:00
</PropertyGroup>
2020-03-11 17:16:49 +08:00
<ItemGroup >
2020-10-06 15:02:07 +08:00
<PackageReference Include= "AntDesign.Charts" Version= "0.2.0" />
2020-11-14 23:44:48 +08:00
<PackageReference Include= "System.Net.Http.Json" Version= "5.0.0" />
<PackageReference Include= "Microsoft.AspNetCore.Components.Web.Extensions" Version= "5.0.0-preview9.20513.1" />
2020-03-11 17:16:49 +08:00
</ItemGroup>
2020-03-17 13:42:54 +08:00
<ItemGroup >
<Content Include= "$(SolutionDir)docs\**" LinkBase= "docs" />
</ItemGroup>
2020-03-31 00:45:14 +08:00
<ItemGroup >
2020-08-14 07:13:28 +08:00
<None Remove= "Resources\*.json" />
<EmbeddedResource Include= "Resources\*.json" />
2020-03-31 00:45:14 +08:00
</ItemGroup>
2020-05-10 15:42:02 +08:00
<ItemGroup >
<Compile Include= "..\Shared\DemoComponent.cs" Link= "Services\DemoComponent.cs" />
2020-05-18 14:46:42 +08:00
<Compile Include= "..\Shared\DemoMenuItem.cs" Link= "Services\DemoMenuItem.cs" />
2020-06-11 10:18:00 +08:00
<Compile Include= "..\Shared\DocsFile.cs" Link= "Services\DocsFile.cs" />
2020-05-10 15:42:02 +08:00
</ItemGroup>
2020-08-26 22:37:08 +08:00
<ItemGroup >
<ProjectReference Include= "..\..\components\AntDesign.csproj" />
</ItemGroup>
2020-03-17 13:42:54 +08:00
<Target Name= "DebugEnsureNodeEnv" BeforeTargets= "Build" Condition= " '$(Configuration)' == 'Debug' And !Exists('$(SolutionDir)node_modules') " >
2020-03-09 18:16:44 +08:00
<!-- 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..." />
2020-03-17 13:42:54 +08:00
<Exec WorkingDirectory= "$(SolutionDir)" Command= "npm install" />
2020-03-09 18:16:44 +08:00
</Target>
2020-03-17 13:42:54 +08:00
<Target Name= "DebugRunGulp" BeforeTargets= "DebugEnsureNodeEnv" Condition= " '$(Configuration)' == 'Debug' And Exists('$(SolutionDir)node_modules') " >
<Exec WorkingDirectory= "$(SolutionDir)" Command= "npm run gulp:docs" />
2020-03-09 18:16:44 +08:00
</Target>
2020-05-10 15:42:02 +08:00
<PropertyGroup >
2020-05-29 00:33:49 +08:00
<CLIProjectDir > site/AntDesign.Docs.Build.CLI</CLIProjectDir>
2020-11-14 23:44:48 +08:00
<CLIPath > $(CLIProjectDir)/bin/Debug/net5/AntDesign.Docs.Build.CLI.dll</CLIPath>
2021-02-06 20:15:46 +08:00
<ProjectDir > $(SolutionDir)/site/AntDesign.Docs</ProjectDir>
2020-05-10 15:42:02 +08:00
</PropertyGroup>
2021-04-04 00:54:18 +08:00
<ItemGroup >
<DocFiles Include= "$(SolutionDir)docs\**\*.*" />
<DocFiles Include= "$(SolutionDir)\CHANGELOG.*.*" />
</ItemGroup>
2020-05-10 15:42:02 +08:00
<Target Name= "RunCli" BeforeTargets= "Build" Condition= " '$(Configuration)' == 'Debug'" >
2021-04-04 00:54:18 +08:00
<Copy SourceFiles= "@(DocFiles)" DestinationFolder= "$(ProjectDir)\wwwroot\docs\%(RecursiveDir)" ContinueOnError= "true" />
2020-05-10 15:42:02 +08:00
<Exec WorkingDirectory= "$(SolutionDir)" Command= "dotnet build $(CLIProjectDir)" />
2020-11-14 23:44:48 +08:00
<Exec WorkingDirectory= "$(SolutionDir)" Command= "dotnet $(CLIPath) demo2json $(ProjectDir)/Demos $(ProjectDir)/wwwroot/meta" />
2021-04-04 00:54:18 +08:00
<Exec WorkingDirectory= "$(SolutionDir)" Command= "dotnet $(CLIPath) menu2json $(ProjectDir)/Demos $(ProjectDir)/wwwroot/docs $(ProjectDir)/wwwroot/meta" />
<Exec WorkingDirectory= "$(SolutionDir)" Command= "dotnet $(CLIPath) docs2html $(ProjectDir)/wwwroot/docs ./site/AntDesign.Docs/wwwroot/docs" />
2020-05-10 15:42:02 +08:00
</Target>
2020-03-09 18:16:44 +08:00
<Target Name= "PublishRunGulp" AfterTargets= "ComputeFilesToPublish" >
2020-03-17 13:42:54 +08:00
<Exec WorkingDirectory= "$(SolutionDir)" Command= "npm install" />
<Exec WorkingDirectory= "$(SolutionDir)" Command= "npm run gulp:docs" />
2020-03-09 18:16:44 +08:00
</Target>
2020-07-20 22:28:09 +08:00
</Project>