2020-02-15 18:22:51 +08:00
<Project Sdk= "Microsoft.NET.Sdk.Razor" >
2019-12-04 16:46:08 +08:00
<PropertyGroup >
2020-02-15 18:22:51 +08:00
<TargetFramework > netstandard2.1</TargetFramework>
2019-12-04 16:46:08 +08:00
<RazorLangVersion > 3.0</RazorLangVersion>
</PropertyGroup>
2020-03-11 17:16:49 +08:00
<ItemGroup >
<PackageReference Include= "Markdig" Version= "0.18.3" />
2020-03-31 00:45:14 +08:00
<PackageReference Include= "YamlDotnet" Version= "8.1.0" />
2020-05-20 00:35:52 +08:00
<PackageReference Include= "System.Net.Http.Json" Version= "3.2.0" />
2020-03-11 17:16:49 +08:00
</ItemGroup>
2019-12-04 16:46:08 +08:00
<ItemGroup >
2020-03-05 12:17:50 +08:00
<ProjectReference Include= "..\..\components\AntBlazor.csproj" />
2019-12-04 16:46:08 +08:00
</ItemGroup>
2020-03-09 18:16:44 +08:00
2020-05-18 14:46:42 +08:00
<PropertyGroup Condition= " '$(SolutionDir)'==''" >
2020-03-28 00:02:11 +08:00
<SolutionDir > ../../</SolutionDir>
</PropertyGroup>
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 >
<None Remove= "Resources\*.yml" />
<EmbeddedResource Include= "Resources\*.yml" />
</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-05-10 15:42:02 +08:00
</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-18 14:46:42 +08:00
<CLIProjectDir > site/AntBlazor.Docs.Build.CLI</CLIProjectDir>
2020-05-10 15:42:02 +08:00
<CLIPath > $(CLIProjectDir)/bin/Debug/netcoreapp3.1/AntBlazor.Docs.Build.CLI.dll</CLIPath>
</PropertyGroup>
<Target Name= "RunCli" BeforeTargets= "Build" Condition= " '$(Configuration)' == 'Debug'" >
<Exec WorkingDirectory= "$(SolutionDir)" Command= "dotnet build $(CLIProjectDir)" />
<Exec WorkingDirectory= "$(SolutionDir)" Command= "dotnet $(CLIPath) demo2json $(ProjectDir)Demos $(ProjectDir)wwwroot/meta" />
<Exec WorkingDirectory= "$(SolutionDir)" Command= "dotnet $(CLIPath) menu2json $(ProjectDir)Demos docs $(ProjectDir)wwwroot/meta" />
</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>
2019-12-04 16:46:08 +08:00
</Project>