Skip to content

Commit 0ebaa7d

Browse files
authored
add readme for nuget package (#85)
* add readme for nuget package * fix packages
1 parent 6d0fc0b commit 0ebaa7d

File tree

2 files changed

+29
-8
lines changed

2 files changed

+29
-8
lines changed

src/layout/example/AntDesign.ProLayout.Wasm/AntDesign.ProLayout.Wasm.csproj

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
<Project Sdk="Microsoft.NET.Sdk.BlazorWebAssembly">
22

33
<PropertyGroup>
4-
<TargetFramework>net7.0</TargetFramework>
4+
<TargetFramework>net8.0</TargetFramework>
55
<ServiceWorkerAssetsManifest>service-worker-assets.js</ServiceWorkerAssetsManifest>
66
</PropertyGroup>
77

88
<ItemGroup>
9-
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly" Version="7.0.0" />
10-
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly.DevServer" Version="7.0.0" PrivateAssets="all" />
11-
<PackageReference Include="Microsoft.Extensions.Options.ConfigurationExtensions" Version="7.0.0" />
12-
<PackageReference Include="System.Net.Http.Json" Version="7.0.0" />
9+
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly" Version="8.0.0" />
10+
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly.DevServer" Version="8.0.0" PrivateAssets="all" />
11+
<PackageReference Include="Microsoft.Extensions.Options.ConfigurationExtensions" Version="8.0.0" />
12+
<PackageReference Include="System.Net.Http.Json" Version="8.0.0" />
1313
</ItemGroup>
1414

1515
<ItemGroup>

src/layout/src/AntDesign.ProLayout.csproj

Lines changed: 24 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22

33
<PropertyGroup>
44
<TargetFrameworks>netstandard2.1;net5;net6;net7;net8</TargetFrameworks>
5-
<LangVersion>11.0</LangVersion>
6-
<OutputType>Library</OutputType>
5+
<LangVersion>latest</LangVersion>
6+
<OutputType>Library</OutputType>
77
<IsPackable>true</IsPackable>
88
<RazorLangVersion>3.0</RazorLangVersion>
99
<Description>Ant Design Pro components for Blazor</Description>
@@ -16,11 +16,13 @@
1616
<Copyright>James Yeung</Copyright>
1717
<Authors>James Yeung</Authors>
1818
<PackageIcon>logo.png</PackageIcon>
19-
<GenerateDocumentationFile>true</GenerateDocumentationFile>
19+
<GenerateDocumentationFile>true</GenerateDocumentationFile>
20+
<PackageReadmeFile>README.md</PackageReadmeFile>
2021
</PropertyGroup>
2122

2223
<ItemGroup>
2324
<None Include="logo.png" Pack="true" PackagePath="" />
25+
<None Include="..\README.md" Pack="true" PackagePath="\" />
2426
</ItemGroup>
2527

2628
<ItemGroup>
@@ -31,6 +33,25 @@
3133
<SolutionDir>../../../</SolutionDir>
3234
</PropertyGroup>
3335

36+
<Target Name="DebugEnsureNodeEnv" BeforeTargets="Build" Condition=" '$(Configuration)' == 'Debug' And !Exists('$(SolutionDir)node_modules') ">
37+
<!-- Ensure Node.js is installed -->
38+
<Exec Command="node --version" ContinueOnError="true">
39+
<Output TaskParameter="ExitCode" PropertyName="ErrorCode" />
40+
</Exec>
41+
<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." />
42+
<Message Importance="high" Text="Restoring dependencies using 'npm'. This may take several minutes..." />
43+
<Exec WorkingDirectory="$(SolutionDir)" Command="npm install" />
44+
</Target>
45+
46+
<Target Name="DebugRunGulp" BeforeTargets="DebugEnsureNodeEnv" Condition=" '$(Configuration)' == 'Debug' And Exists('$(SolutionDir)node_modules') ">
47+
<Exec WorkingDirectory="$(SolutionDir)" Command="npm run gulp:layout" />
48+
</Target>
49+
50+
<Target Name="PublishRunGulp" AfterTargets="ComputeFilesToPublish">
51+
<Exec WorkingDirectory="$(SolutionDir)" Command="npm install" />
52+
<Exec WorkingDirectory="$(SolutionDir)" Command="npm run gulp:layout" />
53+
</Target>
54+
3455
<ItemGroup>
3556
<Content Update="**\*.razor">
3657
<Pack>false</Pack>

0 commit comments

Comments
 (0)