-
Notifications
You must be signed in to change notification settings - Fork 34
Expand file tree
/
Copy pathBlazor.Extensions.Storage.csproj
More file actions
89 lines (69 loc) · 4.02 KB
/
Blazor.Extensions.Storage.csproj
File metadata and controls
89 lines (69 loc) · 4.02 KB
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
<Project Sdk="Microsoft.NET.Sdk.Razor">
<PropertyGroup>
<Title>Blazor Extensions Storage</Title>
<Description>HTML 5 Storage API implementation for ASP.NET Core Blazor.</Description>
<PackageId>Blazor.Extensions.Storage</PackageId>
</PropertyGroup>
<PropertyGroup>
<OutputType>Library</OutputType>
<TargetFramework>netstandard2.0</TargetFramework>
<LangVersion>7.3</LangVersion>
<RazorLangVersion>3.0</RazorLangVersion>
<AddRazorSupportForMvc>true</AddRazorSupportForMvc>
<InteropWorkingDir>$(MSBuildThisFileDirectory)Interop\</InteropWorkingDir>
<ResolveCurrentProjectStaticWebAssetsInputsDependsOn>
CompileInterop;
$(ResolveCurrentProjectStaticWebAssetsInputsDependsOn)
</ResolveCurrentProjectStaticWebAssetsInputsDependsOn>
<DefaultItemExcludes>$(DefaultItemExcludes);$(InteropWorkingDir)node_modules\**</DefaultItemExcludes>
<Version>1.1.0-dev</Version>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Microsoft.AspNetCore.Components.Web" Version="3.1.0-preview3.19555.2" />
</ItemGroup>
<Target Name="DebugEnsureNodeEnv" BeforeTargets="Build" Condition=" '$(Configuration)' == 'Debug' And !Exists('$(InteropWorkingDir)node_modules') ">
<!-- Ensure Node.js is installed -->
<Exec Command="node --version" ContinueOnError="true">
<Output TaskParameter="ExitCode" PropertyName="ErrorCode" />
</Exec>
<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." />
<Message Importance="high" Text="Restoring dependencies using 'npm'. This may take several minutes..." />
<Exec WorkingDirectory="$(InteropWorkingDir)" Command="npm install" />
</Target>
<ItemGroup>
<InteropInputs Include="$(InteropWorkingDir)**" Exclude="$(InteropWorkingDir)node_modules\**;$(InteropWorkingDir)*.d.ts;$(InteropWorkingDir)dist\**" />
<InteropOutputs Include="$(InteropWorkingDir)dist\Storage.js" />
<Content Remove="$(InteropWorkingDir)**" />
<None Include="$(InteropWorkingDir)*" Exclude="$(InteropWorkingDir)node_modules\**" />
<UpToDateCheckInput Include="@(InteropInputs)" Set="StaticWebassets" />
<UpToDateCheckOutput Include="@(InteropOutputs)" Set="StaticWebassets" />
</ItemGroup>
<Target Name="_CreateInteropHash" BeforeTargets="CompileInterop" Condition="'$(DesignTimeBuild)' != 'true'">
<PropertyGroup>
<InteropCompilationCacheFile>$(IntermediateOutputPath)interop.cache</InteropCompilationCacheFile>
</PropertyGroup>
<Hash ItemsToHash="@(InteropInputs)">
<Output TaskParameter="HashResult" PropertyName="_InteropInputsHash" />
</Hash>
<WriteLinesToFile Lines="$(_InteropInputsHash)" File="$(InteropCompilationCacheFile)" Overwrite="True" WriteOnlyWhenDifferent="True" />
<ItemGroup>
<FileWrites Include="$(InteropCompilationCacheFile)" />
</ItemGroup>
</Target>
<Target Name="CompileInterop" Condition="'$(DesignTimeBuild)' != 'true'" Inputs="$(InteropCompilationCacheFile)" Outputs="@(InteropOutputs)">
<Exec WorkingDirectory="$(InteropWorkingDir)" Command="npm install" />
<Exec WorkingDirectory="$(InteropWorkingDir)" Command="npm run build" />
<ItemGroup>
<_InteropBuildOutput Include="$(InteropWorkingDir)dist\**" />
<StaticWebAsset Include="@(_InteropBuildOutput->'%(FullPath)')">
<SourceType></SourceType>
<SourceId>$(PackageId)</SourceId>
<ContentRoot>$([MSBuild]::NormalizeDirectory('$(InteropWorkingDir)\dist'))</ContentRoot>
<BasePath>_content/$(PackageId)</BasePath>
<RelativePath>$([System.String]::Copy('%(RecursiveDir)%(FileName)%(Extension)').Replace('\','/'))</RelativePath>
</StaticWebAsset>
<FileWrites Include="$(_InteropBuildOutput)" />
</ItemGroup>
<Message Importance="high" Text="@(_InteropBuildOutput->'Emitted %(FullPath)')" />
</Target>
</Project>