-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathlight-bootstrap-dashboard-react-netcore3.1.csproj
More file actions
39 lines (39 loc) · 2.05 KB
/
light-bootstrap-dashboard-react-netcore3.1.csproj
File metadata and controls
39 lines (39 loc) · 2.05 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
<Project Sdk="Microsoft.NET.Sdk.Web">
<PropertyGroup>
<TargetFramework>netcoreapp3.1</TargetFramework>
<TypeScriptCompileBlocked>true</TypeScriptCompileBlocked>
<TypeScriptToolsVersion>Latest</TypeScriptToolsVersion>
<IsPackable>false</IsPackable>
<SpaRoot>ClientApp\</SpaRoot>
<DefaultItemExcludes>$(DefaultItemExcludes);$(SpaRoot)node_modules\**</DefaultItemExcludes>
<RootNamespace>sample_dashboard</RootNamespace>
</PropertyGroup>
<ItemGroup>
<Content Remove="$(SpaRoot)**"/>
<None Remove="$(SpaRoot)**"/>
<None Include="$(SpaRoot)**" Exclude="$(SpaRoot)node_modules\**"/>
</ItemGroup>
<ItemGroup>
<PackageReference Include="Microsoft.AspNetCore.Hosting.WindowsServices" Version="3.1.16"/>
<PackageReference Include="Microsoft.AspNetCore.SpaServices.Extensions" Version="3.1.16"/>
</ItemGroup>
<Target Name="DebugEnsureNodeEnv" BeforeTargets="Build" Condition=" '$(Configuration)' == 'Debug' And !Exists('$(SpaRoot)node_modules') ">
<Exec Command="node --version" ContinueOnError="true">
<Output TaskParameter="ExitCode" PropertyName="ErrorCode"/>
</Exec>
<Exec WorkingDirectory="$(SpaRoot)" Command="npm install"/>
<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..."/>
</Target>
<Target Name="PublishRunWebpack" AfterTargets="ComputeFilesToPublish">
<Exec WorkingDirectory="$(SpaRoot)" Command="npm install"/>
<Exec WorkingDirectory="$(SpaRoot)" Command="npm run build"/>
<ItemGroup>
<DistFiles Include="$(SpaRoot)build\**"/>
<ResolvedFileToPublish Include="@(DistFiles->'%(FullPath)')" Exclude="@(ResolvedFileToPublish)">
<RelativePath>%(DistFiles.Identity)</RelativePath>
<CopyToPublishDirectory>PreserveNewest</CopyToPublishDirectory>
</ResolvedFileToPublish>
</ItemGroup>
</Target>
</Project>