-
Notifications
You must be signed in to change notification settings - Fork 22
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
386215b
commit 33b9d99
Showing
5 changed files
with
71 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -14,3 +14,4 @@ benchmarks/data/results/*.md | |
_ReSharper.Caches/ | ||
.idea | ||
.logs | ||
wwwroot |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
<component name="ProjectRunConfigurationManager"> | ||
<configuration default="false" name="Publish Blazor example" type="DotNetProject" factoryName=".NET Project"> | ||
<option name="EXE_PATH" value="$PROJECT_DIR$/build/bin/roslyn4.3/Debug/net8.0/build.exe" /> | ||
<option name="PROGRAM_PARAMETERS" value="publish" /> | ||
<option name="WORKING_DIRECTORY" value="$PROJECT_DIR$" /> | ||
<option name="PASS_PARENT_ENVS" value="1" /> | ||
<option name="USE_EXTERNAL_CONSOLE" value="0" /> | ||
<option name="USE_MONO" value="0" /> | ||
<option name="RUNTIME_ARGUMENTS" value="" /> | ||
<option name="PROJECT_PATH" value="$PROJECT_DIR$/build/build.csproj" /> | ||
<option name="PROJECT_EXE_PATH_TRACKING" value="1" /> | ||
<option name="PROJECT_ARGUMENTS_TRACKING" value="1" /> | ||
<option name="PROJECT_WORKING_DIRECTORY_TRACKING" value="0" /> | ||
<option name="PROJECT_KIND" value="DotNetCore" /> | ||
<option name="PROJECT_TFM" value="net8.0" /> | ||
<method v="2"> | ||
<option name="Build" /> | ||
</method> | ||
</configuration> | ||
</component> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
// ReSharper disable StringLiteralTypo | ||
// ReSharper disable HeapView.DelegateAllocation | ||
// ReSharper disable HeapView.ClosureAllocation | ||
// ReSharper disable ClassNeverInstantiated.Global | ||
// ReSharper disable ReturnTypeCanBeEnumerable.Local | ||
// ReSharper disable InvertIf | ||
|
||
namespace Build; | ||
|
||
internal class PublishBlazorTarget( | ||
Commands commands) | ||
: IInitializable, ITarget<int> | ||
{ | ||
public Task InitializeAsync() => commands.Register( | ||
this, | ||
"Publish balazor web sssembly example", | ||
"publish", | ||
"pb"); | ||
|
||
[SuppressMessage("Performance", "CA1861:Avoid constant arrays as arguments")] | ||
public async Task<int> RunAsync(CancellationToken cancellationToken) | ||
{ | ||
var result = await new DotNetPublish() | ||
.WithProject(Path.Combine("samples", "BlazorWebAssemblyApp", "BlazorWebAssemblyApp.csproj")) | ||
.WithConfiguration("Release") | ||
.WithOutput("wwwroot") | ||
.RunAsync(cancellationToken: cancellationToken); | ||
|
||
return result ?? 1; | ||
} | ||
} |