Welcome to mirror list, hosted at ThFree Co, Russian Federation.

Microsoft.AspNetCore.Components.WebAssembly.Authentication.csproj « src « WebAssembly.Authentication « WebAssembly « Components « src - github.com/dotnet/aspnetcore.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: c9bb1d30093402da39d84317e6097f98bda125e1 (plain)
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
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
<Project Sdk="Microsoft.NET.Sdk.Razor">

  <Import Project="Sdk.props" Sdk="Yarn.MSBuild" Condition=" '$(DotNetBuildFromSource)' != 'true'" />

  <PropertyGroup>
    <TargetFramework>$(DefaultNetCoreTargetFramework)</TargetFramework>
    <Description>Build client-side authentication for single-page applications (SPAs).</Description>
    <IsShippingPackage>true</IsShippingPackage>
    <GenerateDocumentationFile>true</GenerateDocumentationFile>
    <IsTrimmable>true</IsTrimmable>
    <Nullable>disable</Nullable>
    <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
  </PropertyGroup>

  <ItemGroup>
    <Reference Include="Microsoft.AspNetCore.Components.Authorization" />
    <Reference Include="Microsoft.AspNetCore.Components.Web" />
  </ItemGroup>

  <ItemGroup>
    <InternalsVisibleTo Include="Microsoft.AspNetCore.Components.WebAssembly.Authentication.Tests" />
  </ItemGroup>

  <ItemGroup>
    <Compile Include="$(SharedSourceRoot)LinkerFlags.cs" LinkBase="Shared" />
  </ItemGroup>

  <PropertyGroup>
    <YarnWorkingDir>$(MSBuildThisFileDirectory)Interop\</YarnWorkingDir>
    <ResolveStaticWebAssetsInputsDependsOn>
      CompileInterop;
      IncludeCompileInteropOutput;
      $(ResolveStaticWebAssetsInputsDependsOn)
    </ResolveStaticWebAssetsInputsDependsOn>
  </PropertyGroup>

  <ItemGroup>
    <YarnInputs Include="$(YarnWorkingDir)**" Exclude="$(YarnWorkingDir)node_modules\**;$(YarnWorkingDir)*.d.ts;$(YarnWorkingDir)dist\**" />
    <YarnOutputs Include="$(YarnWorkingDir)dist\$(Configuration)\AuthenticationService.js" />

    <Content Remove="$(YarnWorkingDir)**" />
    <None Include="$(YarnWorkingDir)*" Exclude="$(YarnWorkingDir)node_modules\**" />
    
    <EmbeddedResource Include="ILLink.Descriptors.xml">
      <LogicalName>ILLink.Descriptors.xml</LogicalName>
    </EmbeddedResource>

    <UpToDateCheckInput Include="@(YarnInputs)" Set="StaticWebassets" />
    <UpToDateCheckOutput Include="@(YarnOutputs)" Set="StaticWebassets" />
  </ItemGroup>

  <Target Name="_CreateInteropHash" BeforeTargets="CompileInterop" Condition="'$(BuildNodeJS)' != 'false' AND '$(DesignTimeBuild)' != 'true'">

    <PropertyGroup>
      <InteropCompilationCacheFile>$(IntermediateOutputPath)interop.cache</InteropCompilationCacheFile>
    </PropertyGroup>

    <Hash ItemsToHash="@(YarnInputs)">
      <Output TaskParameter="HashResult" PropertyName="_YarnInputsHash" />
    </Hash>

     <WriteLinesToFile Lines="$(_YarnInputsHash)" File="$(InteropCompilationCacheFile)" Overwrite="True" WriteOnlyWhenDifferent="True" />

    <ItemGroup>
      <FileWrites Include="$(InteropCompilationCacheFile)" />
    </ItemGroup>

  </Target>

  <Target Name="CompileInterop" Condition="'$(BuildNodeJS)' != 'false' AND '$(DesignTimeBuild)' != 'true'" Inputs="$(InteropCompilationCacheFile)" Outputs="@(YarnOutputs)">
    <Yarn Command="install --mutex network --frozen-lockfile" WorkingDirectory="$(YarnWorkingDir)" IgnoreStandardErrorWarningFormat="$(IgnoreYarnWarnings)" />
    <Yarn Command="run build:production" WorkingDirectory="$(YarnWorkingDir)" Condition="'$(Configuration)' == 'Release'" IgnoreStandardErrorWarningFormat="$(IgnoreYarnWarnings)" />
    <Yarn Command="run build:debug" WorkingDirectory="$(YarnWorkingDir)" Condition="'$(Configuration)' == 'Debug'" IgnoreStandardErrorWarningFormat="$(IgnoreYarnWarnings)" />

    <Message Importance="high" Text="@(_InteropBuildOutput->'Emitted %(FullPath)')" />

  </Target>

  <Target Name="IncludeCompileInteropOutput">
    <ItemGroup>
      <_InteropBuildOutput Include="$(YarnWorkingDir)dist\$(Configuration)\**" Exclude="$(YarnWorkingDir)dist\.gitignore" />
    </ItemGroup>

    <DefineStaticWebAssets Condition="'@(_InteropBuildOutput)' != ''" SourceType="Computed" SourceId="$(PackageId)" ContentRoot="$(YarnWorkingDir)dist\$(Configuration)\" BasePath="_content/$(PackageId)" CandidateAssets="@(_InteropBuildOutput)" RelativePathFilter="**.js">
      <Output TaskParameter="Assets" ItemName="StaticWebAsset" />
    </DefineStaticWebAssets>

    <ItemGroup>
      <_InteropBuildOutput Include="$(YarnWorkingDir)dist\$(Configuration)\**" Exclude="$(YarnWorkingDir)dist\.gitignore" />
      <FileWrites Include="$(_InteropBuildOutput)" />
    </ItemGroup>
  </Target>

  <Import Project="Sdk.targets" Sdk="Yarn.MSBuild" Condition=" '$(DotNetBuildFromSource)' != 'true'" />

</Project>