Meurig

Anjuna1.csproj

Mar 6th, 2018
147
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.93 KB | None | 0 0
  1. <Project Sdk="Microsoft.NET.Sdk.Web">
  2.  
  3. <PropertyGroup>
  4. <TargetFramework>netcoreapp2.0</TargetFramework>
  5. <TypeScriptCompileBlocked>true</TypeScriptCompileBlocked>
  6. <TypeScriptToolsVersion>Latest</TypeScriptToolsVersion>
  7. <IsPackable>false</IsPackable>
  8. <SpaRoot>ClientApp\</SpaRoot>
  9. <DefaultItemExcludes>$(DefaultItemExcludes);$(SpaRoot)node_modules\**</DefaultItemExcludes>
  10.  
  11. <!-- Set this to true if you enable server-side prerendering -->
  12. <BuildServerSideRenderer>false</BuildServerSideRenderer>
  13. </PropertyGroup>
  14.  
  15. <ItemGroup>
  16. <PackageReference Include="AWSSDK.S3" Version="3.3.17" />
  17. <PackageReference Include="Microsoft.AspNetCore.All" Version="2.0.0" />
  18. <PackageReference Include="Microsoft.AspNetCore.SpaServices.Extensions" Version="2.0.0-rc1-final" />
  19. <PackageReference Include="Microsoft.EntityFrameworkCore.SqlServer" Version="2.0.1" />
  20. <PackageReference Include="Microsoft.EntityFrameworkCore.Tools" Version="2.0.1" />
  21. <PackageReference Include="Microsoft.VisualStudio.Web.CodeGeneration.Design" Version="2.0.2" />
  22. </ItemGroup>
  23.  
  24. <ItemGroup>
  25. <DotNetCliToolReference Include="Microsoft.VisualStudio.Web.CodeGeneration.Tools" Version="2.0.1" />
  26. </ItemGroup>
  27.  
  28. <ItemGroup>
  29. <!-- Don't publish the SPA source files, but do show them in the project files list -->
  30. <Content Remove="$(SpaRoot)**" />
  31. <None Include="$(SpaRoot)**" Exclude="$(SpaRoot)node_modules\**" />
  32. </ItemGroup>
  33.  
  34. <ItemGroup>
  35. <None Remove="ClientApp\src\app\material.module.ts" />
  36. <None Remove="ClientApp\src\app\shared\enum.ts" />
  37. <None Remove="ClientApp\src\app\shared\global.ts" />
  38. </ItemGroup>
  39.  
  40. <ItemGroup>
  41. <TypeScriptCompile Include="ClientApp\src\app\modules\material.module.ts" />
  42. <TypeScriptCompile Include="ClientApp\src\app\shared\enum.ts" />
  43. <TypeScriptCompile Include="ClientApp\src\app\shared\global.ts" />
  44. </ItemGroup>
  45.  
  46. <ItemGroup>
  47. <Content Update="wwwroot\images\anjuna_logo.png">
  48. <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
  49. </Content>
  50. </ItemGroup>
  51.  
  52. <Target Name="DebugEnsureNodeEnv" BeforeTargets="Build" Condition=" '$(Configuration)' == 'Debug' And !Exists('$(SpaRoot)node_modules') ">
  53. <!-- Ensure Node.js is installed -->
  54. <Exec Command="node --version" ContinueOnError="true">
  55. <Output TaskParameter="ExitCode" PropertyName="ErrorCode" />
  56. </Exec>
  57. <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." />
  58. <Message Importance="high" Text="Restoring dependencies using 'npm'. This may take several minutes..." />
  59. <Exec WorkingDirectory="$(SpaRoot)" Command="npm install" />
  60. </Target>
  61.  
  62. <Target Name="PublishRunWebpack" AfterTargets="ComputeFilesToPublish">
  63. <!-- As part of publishing, ensure the JS resources are freshly built in production mode -->
  64. <Exec WorkingDirectory="$(SpaRoot)" Command="npm install" />
  65. <Exec WorkingDirectory="$(SpaRoot)" Command="npm run build -- --prod" />
  66. <Exec WorkingDirectory="$(SpaRoot)" Command="npm run build:ssr -- --prod" Condition=" '$(BuildServerSideRenderer)' == 'true' " />
  67.  
  68. <!-- Include the newly-built files in the publish output -->
  69. <ItemGroup>
  70. <DistFiles Include="$(SpaRoot)dist\**; $(SpaRoot)dist-server\**" />
  71. <DistFiles Include="$(SpaRoot)node_modules\**" Condition="'$(BuildServerSideRenderer)' == 'true'" />
  72. <ResolvedFileToPublish Include="@(DistFiles->'%(FullPath)')" Exclude="@(ResolvedFileToPublish)">
  73. <RelativePath>%(DistFiles.Identity)</RelativePath>
  74. <CopyToPublishDirectory>PreserveNewest</CopyToPublishDirectory>
  75. </ResolvedFileToPublish>
  76. </ItemGroup>
  77. </Target>
  78.  
  79.  
  80. <ItemGroup>
  81. <DotNetCliToolReference Include="Amazon.ElasticBeanstalk.Tools" Version="1.1.0" />
  82. </ItemGroup>
  83. </Project>
Advertisement
Add Comment
Please, Sign In to add comment