mirror of
https://github.com/aspnet/JavaScriptServices.git
synced 2025-12-22 17:47:53 +00:00
36 lines
1.7 KiB
XML
36 lines
1.7 KiB
XML
<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.0" />
|
|
<PackageReference Include="Microsoft.AspNetCore.Mvc" Version="1.1.1" />
|
|
<PackageReference Include="Microsoft.AspNetCore.SpaServices" Version="1.1.0" />
|
|
<PackageReference Include="Microsoft.AspNetCore.StaticFiles" Version="1.1.0" />
|
|
<PackageReference Include="Microsoft.Extensions.Logging.Debug" Version="1.1.0" />
|
|
</ItemGroup>
|
|
<ItemGroup>
|
|
<!-- Files not to show in IDE -->
|
|
<None Remove="yarn.lock" />
|
|
|
|
<!-- Files not to publish (note that the 'dist' subfolders are re-added below) -->
|
|
<Content Remove="ClientApp\**" />
|
|
</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 --config webpack.config.vendor.js --env.prod" />
|
|
<Exec Command="node node_modules/webpack/bin/webpack.js --env.prod" />
|
|
|
|
<!-- Include the newly-built files in the publish output -->
|
|
<ItemGroup>
|
|
<DistFiles Include="wwwroot\dist\**; ClientApp\dist\**" />
|
|
<ResolvedFileToPublish Include="@(DistFiles->'%(FullPath)')" Exclude="@(ResolvedFileToPublish)">
|
|
<RelativePath>%(DistFiles.Identity)</RelativePath>
|
|
<CopyToPublishDirectory>PreserveNewest</CopyToPublishDirectory>
|
|
</ResolvedFileToPublish>
|
|
</ItemGroup>
|
|
</Target>
|
|
</Project> |