forked from TrilonIO/aspnetcore-angular-universal
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Asp2017.csproj
53 lines (52 loc) · 2.47 KB
/
Asp2017.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
<Project ToolsVersion="15.0" Sdk="Microsoft.NET.Sdk.Web">
<PropertyGroup>
<TargetFramework>netcoreapp1.1</TargetFramework>
<TypeScriptCompileBlocked>true</TypeScriptCompileBlocked>
<IsPackable>false</IsPackable>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Microsoft.AspNetCore" Version="1.1.1" />
<PackageReference Include="Microsoft.AspNetCore.Mvc" Version="1.1.2" />
<PackageReference Include="Microsoft.AspNetCore.SpaServices" Version="1.1.0" />
<PackageReference Include="Microsoft.AspNetCore.StaticFiles" Version="1.1.1" />
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="1.1.1" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Sqlite" Version="1.1.1" />
<PackageReference Include="Microsoft.Extensions.Logging.Debug" Version="1.1.1" />
<PackageReference Include="Swashbuckle.AspNetCore" Version="1.0.0-rc3" />
</ItemGroup>
<ItemGroup>
<!-- Files not to show in IDE -->
<None Remove="yarn.lock" />
<Content Remove="wwwroot\dist\**" />
<None Remove="Client\dist\**" />
<Content Remove="coverage\**" />
<!-- Files not to publish (note that the 'dist' subfolders are re-added below) -->
<Content Remove="Client\**" />
</ItemGroup>
<ItemGroup>
<Content Include="Client\tsconfig.browser.json" />
<Content Include="Client\tsconfig.server.aot.json" />
<Content Include="Client\tsconfig.server.json" />
</ItemGroup>
<Target Name="RunWebpack" AfterTargets="ComputeFilesToPublish">
<!-- As part of publishing, ensure the JS resources are freshly built in production mode -->
<Exec Command="npm install" />
<Exec Command="node node_modules/webpack/bin/webpack.js --env.aot --env.client" />
<Exec Command="node node_modules/webpack/bin/webpack.js --env.aot --env.server" />
<!-- Include the newly-built files in the publish output -->
<ItemGroup>
<DistFiles Include="wwwroot\dist\**; Client\dist\**" />
<ResolvedFileToPublish Include="@(DistFiles->'%(FullPath)')" Exclude="@(ResolvedFileToPublish)">
<RelativePath>%(DistFiles.Identity)</RelativePath>
<CopyToPublishDirectory>PreserveNewest</CopyToPublishDirectory>
</ResolvedFileToPublish>
</ItemGroup>
</Target>
<Target Name="CleanDist" AfterTargets="Clean">
<ItemGroup>
<FilesToDelete Include="Client\dist\**; wwwroot\dist\**"/>
</ItemGroup>
<Delete Files="@(FilesToDelete)" />
<RemoveDir Directories="Client\dist; wwwroot\dist" />
</Target>
</Project>