-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: static files in aot and dotnet tool versions
- Loading branch information
Showing
6 changed files
with
150 additions
and
50 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
$RepositoryRoot = Split-Path $PSScriptRoot | ||
$ArtifactsRoot = Join-Path $RepositoryRoot 'artifacts' | ||
|
||
Remove-Item $ArtifactsRoot -Force -Recurse -ErrorAction SilentlyContinue | ||
Get-ChildItem $RepositoryRoot -Directory -Recurse -Filter bin | Remove-Item -Recurse | ||
Get-ChildItem $RepositoryRoot -Directory -Recurse -Filter obj | Remove-Item -Recurse | ||
Get-ChildItem $RepositoryRoot -Directory -Recurse -Filter app | Remove-Item -Recurse | ||
Get-ChildItem $RepositoryRoot -Directory -Recurse -Filter nupkg | Remove-Item -Recurse | ||
Get-ChildItem $RepositoryRoot -Directory -Recurse -Filter build | Remove-Item -Recurse | ||
Get-ChildItem $RepositoryRoot -Directory -Recurse -Filter node_modules | Remove-Item -Recurse |
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
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
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,75 @@ | ||
|
||
<!-- Ensure Node.js is installed --> | ||
<!-- | ||
<Target Name="DebugEnsureNodeEnv" BeforeTargets="Build" Condition=" '$(Configuration)' == 'Debug' And !Exists('$(SpaRoot)node_modules') "> | ||
<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="$(SpaRoot)" Command="npm install" /> | ||
</Target> | ||
--> | ||
|
||
<!-- <Target Name="CustomActionsBeforePublish" BeforeTargets="BeforePublish"> | ||
<Message Text="DEBUGAOT Inside BeforePublish" Importance="high" /> | ||
</Target> | ||
<Target Name="CustomActionsAfterPublish" AfterTargets="AfterPublish"> | ||
<Message Text="DEBUGAOT Inside AfterPublish" Importance="high" /> | ||
</Target> --> | ||
|
||
<!-- <Target Name="CustomActionsBeforePublish222" BeforeTargets="BeforePublish" Condition="'$(Configuration)' == 'ReleaseAOT'"> | ||
<Message Text="DEBUGAOT Inside BeforePublish ReleaseAOTReleaseAOTReleaseAOTReleaseAOT" Importance="high" /> | ||
</Target> --> | ||
|
||
<!-- https://learn.microsoft.com/en-us/visualstudio/msbuild/msbuild-conditions?view=vs-2022#supported-elements --> | ||
<!-- | ||
<Target Name="PublishRunWebpack" AfterTargets="ComputeFilesToPublish"> | ||
<Message Text="DEBUGAOT Publish frontend in release mode" Importance="high" /> | ||
<Exec WorkingDirectory="$(SpaRoot)" Command="npm install"/> | ||
<Exec WorkingDirectory="$(SpaRoot)" Command="npm run build"/> | ||
<ItemGroup> | ||
<DistFiles Include="$(SpaRoot)build\**" /> | ||
<ResolvedFileToPublish Include="@(DistFiles->'%(FullPath)')" Exclude="@(ResolvedFileToPublish)"> | ||
<RelativePath>wwwroot\%(RecursiveDir)%(FileName)%(Extension)</RelativePath> | ||
<CopyToPublishDirectory>Never</CopyToPublishDirectory> | ||
<ExcludeFromSingleFile>false</ExcludeFromSingleFile> | ||
</ResolvedFileToPublish> | ||
</ItemGroup> | ||
</Target> | ||
--> | ||
|
||
<!-- As part of publishing, ensure the JS resources are freshly built in production mode --> | ||
<!-- Include the newly-built files in the publish output --> | ||
<!-- Condition="'$(Configuration)' == 'ReleaseAOT'" --> | ||
|
||
<!-- <ItemGroup Condition="'$(Configuration)' != 'ReleaseAOT'"> | ||
<DistFiles Include="$(SpaRoot)build\**" /> | ||
<ResolvedFileToPublish Include="@(DistFiles->'%(FullPath)')" Exclude="@(ResolvedFileToPublish)"> | ||
<RelativePath>wwwroot\%(RecursiveDir)%(FileName)%(Extension)</RelativePath> | ||
<CopyToPublishDirectory>PreserveNewest</CopyToPublishDirectory> | ||
<ExcludeFromSingleFile>true</ExcludeFromSingleFile> | ||
</ResolvedFileToPublish> | ||
</ItemGroup> --> | ||
|
||
|
||
|
||
|
||
<Target Name="PublishRunWebpack" AfterTargets="ComputeFilesToPublish" Condition="'$(Configuration)' == 'Debug'"> | ||
<!-- As part of publishing, ensure the JS resources are freshly built in production mode --> | ||
<Exec WorkingDirectory="$(SpaRoot)" Command="npm install" /> | ||
<Exec WorkingDirectory="$(SpaRoot)" Command="npm run build" /> | ||
|
||
<!-- Include the newly-built files in the publish output --> | ||
<ItemGroup> | ||
<DistFiles Include="$(SpaRoot)build\**" /> | ||
<ResolvedFileToPublish Include="@(DistFiles->'%(FullPath)')" Exclude="@(ResolvedFileToPublish)"> | ||
<RelativePath>wwwroot\%(RecursiveDir)%(FileName)%(Extension)</RelativePath> | ||
<CopyToPublishDirectory>PreserveNewest</CopyToPublishDirectory> | ||
<ExcludeFromSingleFile>true</ExcludeFromSingleFile> | ||
</ResolvedFileToPublish> | ||
</ItemGroup> | ||
</Target> |