Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 2 additions & 6 deletions Paperless.slnx
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,7 @@
<Project Path="PaperlessREST.Tests/PaperlessREST.Tests.csproj" />
<Project Path="PaperlessServices.Tests/PaperlessServices.Tests.csproj" />
<Project Path="PaperlessUI.Blazor/PaperlessUI.Blazor.csproj" />
<Project Path="PaperlessUI.Angular/PaperlessUI.Angular.esproj">
<Build Solution="Debug|*" />
</Project>
<Project Path="PaperlessUI.React/PaperlessUI.React.esproj">
<Build Solution="Debug|*" />
</Project>
<Project Path="PaperlessUI.Angular/PaperlessUI.Angular.esproj" />
<Project Path="PaperlessUI.React/PaperlessUI.React.esproj" />
<Project Path="Pipeline/Build.csproj" />
</Solution>
56 changes: 46 additions & 10 deletions PaperlessUI.Angular/PaperlessUI.Angular.esproj
Original file line number Diff line number Diff line change
@@ -1,13 +1,49 @@
<Project Sdk="Microsoft.VisualStudio.JavaScript.Sdk/1.0.5483906">
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003" DefaultTargets="Build">

<!--
Hand-rolled esproj: drops Microsoft.VisualStudio.JavaScript.Sdk entirely
(its versions ship on VS-Windows's private feed; on nuget.org only every
Nth build is published — pinning is fragile and the SDK assumes npm).
CI builds this project in its own pnpm job (see .github/workflows/ci.yml),
so the MSBuild targets below are no-ops by default and exist purely so
'dotnet build Paperless.slnx' succeeds and Rider's solution explorer
surfaces the directory tree.
-->

<PropertyGroup>
<StartupCommand>pnpm run start</StartupCommand>
<JavaScriptTestRoot>src\</JavaScriptTestRoot>
<JavaScriptTestFramework>Jasmine</JavaScriptTestFramework>
<!-- Allows the build (or compile) script located on package.json to run on Build -->
<ShouldRunBuildScript>false</ShouldRunBuildScript>
<!-- pnpm-managed; skip the JS SDK's npm install so dotnet build doesn't clobber pnpm-lock.yaml -->
<ShouldRunNpmInstall>false</ShouldRunNpmInstall>
<!-- Folder where production build objects will be placed -->
<BuildOutputFolder>$(MSBuildProjectDirectory)\dist\paperless-ui-angular</BuildOutputFolder>
<FrontendRoot>$(MSBuildProjectDirectory)/</FrontendRoot>
<PnpmExe Condition="'$(PnpmExe)' == ''">pnpm</PnpmExe>
<DistDir>$(FrontendRoot)dist/paperless-ui-angular</DistDir>
<RunFrontendOnBuild Condition="'$(RunFrontendOnBuild)' == ''">false</RunFrontendOnBuild>
</PropertyGroup>

<Target Name="Restore">
<Message Text="[PaperlessUI.Angular] Restore is a no-op; pnpm install runs in the CI frontend job." Importance="low"/>
</Target>

<Target Name="Build" DependsOnTargets="Restore">
<Message Text="[PaperlessUI.Angular] Build is a no-op; pnpm run build runs in the CI frontend job." Importance="low"/>
<Exec Command="$(PnpmExe) install --frozen-lockfile=false" WorkingDirectory="$(FrontendRoot)" Condition=" '$(RunFrontendOnBuild)' == 'true' "/>
Comment on lines +21 to +26
<Exec Command="$(PnpmExe) run build" WorkingDirectory="$(FrontendRoot)" Condition=" '$(RunFrontendOnBuild)' == 'true' "/>
</Target>

<Target Name="Test">
<Message Text="[PaperlessUI.Angular] Test is a no-op here; run pnpm test inside the project." Importance="low"/>
</Target>

<Target Name="Clean">
<RemoveDir Directories="$(DistDir)" Condition="Exists('$(DistDir)')"/>
</Target>

<ItemGroup>
<None Include="package.json"/>
<None Include="pnpm-lock.yaml" Condition="Exists('pnpm-lock.yaml')"/>
<None Include="angular.json" Condition="Exists('angular.json')"/>
<None Include="tsconfig.json" Condition="Exists('tsconfig.json')"/>
<None Include="src/**/*"/>
<None Include="public/**/*" Condition="Exists('public')"/>
<None Remove="node_modules/**"/>
<None Remove="dist/**"/>
</ItemGroup>

</Project>
57 changes: 47 additions & 10 deletions PaperlessUI.React/PaperlessUI.React.esproj
Original file line number Diff line number Diff line change
@@ -1,13 +1,50 @@
<Project Sdk="Microsoft.VisualStudio.JavaScript.Sdk/1.0.5483906">
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003" DefaultTargets="Build">

<!--
Hand-rolled esproj: drops Microsoft.VisualStudio.JavaScript.Sdk entirely
(its versions ship on VS-Windows's private feed; on nuget.org only every
Nth build is published — pinning is fragile and the SDK assumes npm).
CI builds this project in its own pnpm job (see .github/workflows/ci.yml),
so the MSBuild targets below are no-ops by default and exist purely so
'dotnet build Paperless.slnx' succeeds and Rider's solution explorer
surfaces the directory tree.
-->

<PropertyGroup>
<StartupCommand>pnpm run dev</StartupCommand>
<JavaScriptTestRoot>src\</JavaScriptTestRoot>
<JavaScriptTestFramework>Vitest</JavaScriptTestFramework>
<!-- Allows the build (or compile) script located on package.json to run on Build -->
<ShouldRunBuildScript>false</ShouldRunBuildScript>
<!-- pnpm-managed; skip the JS SDK's npm install so dotnet build doesn't clobber pnpm-lock.yaml -->
<ShouldRunNpmInstall>false</ShouldRunNpmInstall>
<!-- Folder where production build objects will be placed -->
<BuildOutputFolder>$(MSBuildProjectDirectory)\dist</BuildOutputFolder>
<FrontendRoot>$(MSBuildProjectDirectory)/</FrontendRoot>
<PnpmExe Condition="'$(PnpmExe)' == ''">pnpm</PnpmExe>
<DistDir>$(FrontendRoot)dist</DistDir>
<RunFrontendOnBuild Condition="'$(RunFrontendOnBuild)' == ''">false</RunFrontendOnBuild>
</PropertyGroup>

<Target Name="Restore">
<Message Text="[PaperlessUI.React] Restore is a no-op; pnpm install runs in the CI frontend job." Importance="low"/>
</Target>

<Target Name="Build" DependsOnTargets="Restore">
<Message Text="[PaperlessUI.React] Build is a no-op; pnpm run build runs in the CI frontend job." Importance="low"/>
<Exec Command="$(PnpmExe) install --frozen-lockfile=false" WorkingDirectory="$(FrontendRoot)" Condition=" '$(RunFrontendOnBuild)' == 'true' "/>
Comment on lines +21 to +26
<Exec Command="$(PnpmExe) run build" WorkingDirectory="$(FrontendRoot)" Condition=" '$(RunFrontendOnBuild)' == 'true' "/>
</Target>

<Target Name="Test">
<Message Text="[PaperlessUI.React] Test is a no-op here; run pnpm test inside the project." Importance="low"/>
</Target>

<Target Name="Clean">
<RemoveDir Directories="$(DistDir)" Condition="Exists('$(DistDir)')"/>
</Target>

<ItemGroup>
<None Include="package.json"/>
<None Include="pnpm-lock.yaml" Condition="Exists('pnpm-lock.yaml')"/>
<None Include="vite.config.ts" Condition="Exists('vite.config.ts')"/>
<None Include="tsconfig.json" Condition="Exists('tsconfig.json')"/>
<None Include="index.html" Condition="Exists('index.html')"/>
<None Include="src/**/*"/>
<None Include="public/**/*" Condition="Exists('public')"/>
<None Remove="node_modules/**"/>
<None Remove="dist/**"/>
</ItemGroup>

</Project>