1
1
<Project Sdk =" Microsoft.NET.Sdk.Razor" >
2
2
3
- <PropertyGroup >
4
- <TargetFrameworks >net8.0;net7.0;net6.0</TargetFrameworks >
5
- </PropertyGroup >
3
+ <PropertyGroup >
4
+ <TargetFrameworks >net8.0;net7.0;net6.0</TargetFrameworks >
5
+ </PropertyGroup >
6
6
7
- <ItemGroup >
8
- <SupportedPlatform Include =" browser" />
9
- </ItemGroup >
7
+ <ItemGroup >
8
+ <SupportedPlatform Include =" browser" />
9
+ </ItemGroup >
10
10
11
- <PropertyGroup >
12
- <!-- VS's FastUpToDateCheck doesn't consider .ts file changes, so it's necessary to disable it
13
- to get incremental builds to work correctly (albeit not as fast as if FastUpToDateCheck did work
14
- for them) -->
15
- <DisableFastUpToDateCheck >true</DisableFastUpToDateCheck >
16
- <Authors >BattlefieldDuck</Authors >
17
- <RepositoryUrl >https://github.com/BattlefieldDuck/XtermBlazor</RepositoryUrl >
18
- <PackageProjectUrl >https://github.com/BattlefieldDuck/XtermBlazor</PackageProjectUrl >
19
- <PackageLicenseFile >LICENSE</PackageLicenseFile >
20
- <Description >Brings xterm.js to Blazor</Description >
21
- <PackageIcon >icon.png</PackageIcon >
22
- <Version >2.1.1</Version >
23
- <PackageTags >xterm, xterm-js, blazor, blazor-server, blazor-webassembly, blazor-wasm,
24
- xtermblazor</PackageTags >
25
- <GeneratePackageOnBuild >true</GeneratePackageOnBuild >
26
- <GenerateDocumentationFile >true</GenerateDocumentationFile >
27
- <Nullable >enable</Nullable >
28
- <PackageReadmeFile >README.md</PackageReadmeFile >
29
- <LangVersion >12.0</LangVersion >
30
- </PropertyGroup >
11
+ <PropertyGroup >
12
+ <!-- VS's FastUpToDateCheck doesn't consider .ts file changes, so it's necessary to disable it
13
+ to get incremental builds to work correctly (albeit not as fast as if FastUpToDateCheck did work
14
+ for them) -->
15
+ <DisableFastUpToDateCheck >true</DisableFastUpToDateCheck >
16
+ <Authors >BattlefieldDuck</Authors >
17
+ <RepositoryUrl >https://github.com/BattlefieldDuck/XtermBlazor</RepositoryUrl >
18
+ <PackageProjectUrl >https://github.com/BattlefieldDuck/XtermBlazor</PackageProjectUrl >
19
+ <PackageLicenseFile >LICENSE</PackageLicenseFile >
20
+ <Description >Brings xterm.js to Blazor</Description >
21
+ <PackageIcon >icon.png</PackageIcon >
22
+ <Version >2.1.1</Version >
23
+ <PackageTags >
24
+ xterm, xterm-js, blazor, blazor-server, blazor-webassembly, blazor-wasm,
25
+ xtermblazor
26
+ </PackageTags >
27
+ <GeneratePackageOnBuild >true</GeneratePackageOnBuild >
28
+ <GenerateDocumentationFile >true</GenerateDocumentationFile >
29
+ <Nullable >enable</Nullable >
30
+ <PackageReadmeFile >README.md</PackageReadmeFile >
31
+ <LangVersion >12.0</LangVersion >
32
+ </PropertyGroup >
31
33
32
- <PropertyGroup Label =" SourceLink" >
33
- <PublishRepositoryUrl >true</PublishRepositoryUrl >
34
- <EmbedUntrackedSources >true</EmbedUntrackedSources >
35
- <IncludeSymbols >true</IncludeSymbols >
36
- <SymbolPackageFormat >snupkg</SymbolPackageFormat >
37
- </PropertyGroup >
34
+ <PropertyGroup Label =" SourceLink" >
35
+ <PublishRepositoryUrl >true</PublishRepositoryUrl >
36
+ <EmbedUntrackedSources >true</EmbedUntrackedSources >
37
+ <IncludeSymbols >true</IncludeSymbols >
38
+ <SymbolPackageFormat >snupkg</SymbolPackageFormat >
39
+ </PropertyGroup >
38
40
39
- <PropertyGroup Condition =" '$(GITHUB_ACTIONS)' == 'true'" >
40
- <ContinuousIntegrationBuild >true</ContinuousIntegrationBuild >
41
- </PropertyGroup >
41
+ <PropertyGroup Condition =" '$(GITHUB_ACTIONS)' == 'true'" >
42
+ <ContinuousIntegrationBuild >true</ContinuousIntegrationBuild >
43
+ </PropertyGroup >
42
44
43
- <ItemGroup Condition =" '$(TargetFramework)' == 'net6.0'" >
44
- <PackageReference Include =" Macross.Json.Extensions" Version =" 3.0.0" />
45
- <PackageReference Include =" Microsoft.AspNetCore.Components.Web" Version =" 6.0.26" />
46
- </ItemGroup >
45
+ <ItemGroup Condition =" '$(TargetFramework)' == 'net6.0'" >
46
+ <PackageReference Include =" Macross.Json.Extensions" Version =" 3.0.0" />
47
+ <PackageReference Include =" Microsoft.AspNetCore.Components.Web" Version =" 6.0.26" />
48
+ </ItemGroup >
47
49
48
- <ItemGroup Condition =" '$(TargetFramework)' == 'net7.0'" >
49
- <PackageReference Include =" Macross.Json.Extensions" Version =" 3.0.0" />
50
- <PackageReference Include =" Microsoft.AspNetCore.Components.Web" Version =" 7.0.15" />
51
- </ItemGroup >
50
+ <ItemGroup Condition =" '$(TargetFramework)' == 'net7.0'" >
51
+ <PackageReference Include =" Macross.Json.Extensions" Version =" 3.0.0" />
52
+ <PackageReference Include =" Microsoft.AspNetCore.Components.Web" Version =" 7.0.15" />
53
+ </ItemGroup >
52
54
53
- <ItemGroup Condition =" '$(TargetFramework)' == 'net8.0'" >
54
- <PackageReference Include =" Macross.Json.Extensions" Version =" 3.0.0" />
55
- <PackageReference Include =" Microsoft.AspNetCore.Components.Web" Version =" 8.0.1" />
56
- </ItemGroup >
55
+ <ItemGroup Condition =" '$(TargetFramework)' == 'net8.0'" >
56
+ <PackageReference Include =" Macross.Json.Extensions" Version =" 3.0.0" />
57
+ <PackageReference Include =" Microsoft.AspNetCore.Components.Web" Version =" 8.0.1" />
58
+ </ItemGroup >
57
59
58
- <ItemGroup >
59
- <Folder Include =" wwwroot\" />
60
- </ItemGroup >
60
+ <ItemGroup >
61
+ <WebpackFiles Include =" $(ProjectDir)src\**.*;" />
62
+ <CompiledWebpackFiles Include =" $(OutDir)wwwroot\XtermBlazor.min.js;$(OutDir)wwwroot\XtermBlazor.min.css" />
63
+ <NodePackageSource Include =" $(ProjectDir)src\package.json;$(ProjectDir)package-lock.json" />
64
+ </ItemGroup >
61
65
62
- < ItemGroup >
63
- < Content Update = " src\** " >
64
- < Pack >False</ Pack >
65
- < CopyToOutputDirectory >Never</ CopyToOutputDirectory >
66
- </ Content >
67
- </ ItemGroup >
66
+ < Target Name = " NpmInstall " BeforeTargets = " NpmBuild " Inputs = " @(NodePackageSource) " Outputs = " $(ProjectDir)src\node_modules\.source " >
67
+ < Message Text = " Installing Node Dependencies (NpmInstall) $(OutDir) " Importance = " high " / >
68
+ < Exec Command = " npm ci -q " WorkingDirectory = " src " Condition = " $(Configuration) == 'Release' " / >
69
+ < Exec Command = " npm install -q " WorkingDirectory = " src " Condition = " $(Configuration) == 'Debug' " / >
70
+ < Touch Files = " $(ProjectDir)src\node_modules\.source " AlwaysCreate = " true " / >
71
+ </ Target >
68
72
69
- <ItemGroup >
70
- <None Include =" ..\LICENSE" >
71
- <Pack >True</Pack >
72
- <PackagePath >\</PackagePath >
73
- </None >
74
- <None Include =" ..\README.md" >
75
- <Pack >True</Pack >
76
- <PackagePath >\</PackagePath >
77
- </None >
78
- <None Include =" icon.png" >
79
- <Pack >True</Pack >
80
- <PackagePath >\</PackagePath >
81
- </None >
82
- </ItemGroup >
73
+ <Target Name =" NpmBuild" BeforeTargets =" DispatchToInnerBuilds" Inputs =" @(WebpackFiles)" Outputs =" @(CompiledWebpackFiles)" >
74
+ <Message Text =" Create `wwwroot/XtermBlazor.min.js` and `wwwroot/XtermBlazor.min.css`" Importance =" high" />
75
+ <Exec Command =" npm run build:production" WorkingDirectory =" src" Condition =" $(Configuration) == 'Release'" />
76
+ <Exec Command =" npm run build" WorkingDirectory =" src" Condition =" $(Configuration) == 'Debug'" />
77
+ </Target >
78
+
79
+ <ItemGroup >
80
+ <Content Update =" src\**" >
81
+ <Pack >False</Pack >
82
+ <CopyToOutputDirectory >Never</CopyToOutputDirectory >
83
+ </Content >
84
+ </ItemGroup >
85
+
86
+ <ItemGroup >
87
+ <None Include =" ..\LICENSE" >
88
+ <Pack >True</Pack >
89
+ <PackagePath >\</PackagePath >
90
+ </None >
91
+ <None Include =" ..\README.md" >
92
+ <Pack >True</Pack >
93
+ <PackagePath >\</PackagePath >
94
+ </None >
95
+ <None Include =" icon.png" >
96
+ <Pack >True</Pack >
97
+ <PackagePath >\</PackagePath >
98
+ </None >
99
+ </ItemGroup >
83
100
84
101
</Project >
0 commit comments