-
Notifications
You must be signed in to change notification settings - Fork 14
/
Copy pathMusicFestival.csproj
56 lines (48 loc) · 2.15 KB
/
MusicFestival.csproj
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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
<Project Sdk="Microsoft.NET.Sdk.Web">
<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
<RootNamespace>MusicFestival</RootNamespace>
<Nullable>enable</Nullable>
<ImplicitUsings>enable</ImplicitUsings>
<IsPackable>false</IsPackable>
<ClientAppRoot>ClientApp\</ClientAppRoot>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="EPiServer.CMS" Version="12.23.0" />
<PackageReference Include="EPiServer.ContentDeliveryApi.Cms" Version="3.9.0" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\..\src\EPiServer.ContentDelivery.NodeProxy\EPiServer.ContentDelivery.NodeProxy.csproj" />
</ItemGroup>
<ItemGroup>
<!--
Do not publish the client app source files, but do show them in the project files list.
We will publish them in the target 'BuildClientApp'.
-->
<Content Remove="$(ClientAppRoot)**" />
<None Remove="$(ClientAppRoot)**" />
<None Include="$(ClientAppRoot)**" Exclude="$(ClientAppRoot)node_modules\**" />
</ItemGroup>
<Target Name="BuildClientApp" AfterTargets="ComputeFilesToPublish">
<!--
As part of publishing, ensure the client app is freshly built in production mode.
Alternatively, the client app can be built in a separate step in a CI/CD build pipeline,
then remove this target and make sure the client app files are included when deploying.
-->
<Exec WorkingDirectory="$(ClientAppRoot)" Command="npm install" />
<Exec WorkingDirectory="$(ClientAppRoot)" Command="npm run build" />
<!--
Move the production client app to wwwroot so dotnet can serve the static files.
This is not neccessary, but otherwise they will be served by Node.js proxied
through dotnet.
-->
<ItemGroup>
<DistFiles Include="$(ClientAppRoot).output\**" />
<ResolvedFileToPublish Include="@(DistFiles->'%(FullPath)')" Exclude="@(ResolvedFileToPublish)">
<RelativePath>wwwroot\%(RecursiveDir)%(FileName)%(Extension)</RelativePath>
<CopyToPublishDirectory>PreserveNewest</CopyToPublishDirectory>
<ExcludeFromSingleFile>true</ExcludeFromSingleFile>
</ResolvedFileToPublish>
</ItemGroup>
</Target>
</Project>