<Project Sdk="Microsoft.NET.Sdk">

  <Import Project="..\..\build\common.props" />

  <PropertyGroup>
    <Description>Helpers for building single-page applications on ASP.NET MVC Core.</Description>
    <TargetFramework>netstandard2.0</TargetFramework>
    <PackageTags>aspnetcore;aspnetcoremvc;nodeservices</PackageTags>
    <TypeScriptCompileBlocked>true</TypeScriptCompileBlocked>
    <GenerateDocumentationFile>true</GenerateDocumentationFile>
  </PropertyGroup>

  <ItemGroup>
    <None Remove="node_modules\**\*" />
    <EmbeddedResource Include="Content\**\*" />
    <ProjectReference Include="..\Microsoft.AspNetCore.NodeServices\Microsoft.AspNetCore.NodeServices.csproj" />
    <PackageReference Include="Microsoft.AspNetCore.Mvc.TagHelpers" Version="$(AspNetCoreVersion)" />
    <PackageReference Include="Microsoft.AspNetCore.Mvc.ViewFeatures" Version="$(AspNetCoreVersion)" />
  </ItemGroup>

  <Target Name="PrepublishScript" BeforeTargets="PrepareForPublish" Condition=" '$(IsCrossTargetingBuild)' != 'true' ">
    <Exec Command="npm install" />
    <Exec Command="node node_modules/webpack/bin/webpack.js" />
  </Target>

</Project>
