change publish logic.

This commit is contained in:
lchen committed 2026-10-23 16:01:31 +08:00
1 parent 27623a4e93
commit ce2fa6eec7
6 files changed
+23 -13

No files matched your search

+1 -4
View File
@@ -1,4 +1 @@
interface DetailItem {
id: number;
name: string;
}

+1 -3
View File
@@ -1,6 +1,4 @@
/// <reference path="./global.d.ts" />
export interface ApiSuccess<T> {
export interface ApiSuccess<T> {
errorCode: 0;
result: T;
tag?: unknown;
+7 -1
View File
@@ -1,7 +1,13 @@
import { ApiError, fetchApi } from './helper';
const container = document.querySelector('#main');
declare global {
interface DetailItem {
id: number;
name: string;
}
}
const container = document.querySelector('#main');
if (container) {
try {
const detail = await fetchApi<DetailItem>('api/detail?id=11');
@@ -12,5 +12,3 @@ if (errorContainer instanceof HTMLElement) {
const err = window.__SERVER_DATA__;
errorContainer.innerText = `${err.errorCode}: ${err.errorMessage}`;
}
export { }
+2
View File
@@ -4,7 +4,9 @@
"vite.config.ts"
],
"compilerOptions": {
"lib": ["dom", "ES2015"],
"types": [ "node" ],
"skipLibCheck": true,
"module": "esnext",
"moduleResolution": "bundler"
}
+12 -3
View File
@@ -5,23 +5,25 @@
<Nullable>disable</Nullable>
<ImplicitUsings>enable</ImplicitUsings>
<OutputType>Exe</OutputType>
<StaticWebAssetsEnabled>false</StaticWebAssetsEnabled>
<UseAppHost>false</UseAppHost>
<PublishReadyToRun>true</PublishReadyToRun>
<SpaRoot>Source\</SpaRoot>
<FrontendStampFile>$(BaseIntermediateOutputPath)$(Configuration)\frontend_build.stamp</FrontendStampFile>
</PropertyGroup>
<ItemGroup>
<Content Remove="Source\*.json" />
<Content Remove="wwwroot\dist\**" />
<None Include="Source\*.json" />
<None Update="Templates\**\*.html">
<None Update="Templates\**">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
</ItemGroup>
<ItemGroup>
<FrontendInputs Include="$(SpaRoot)src\**"/>
<FrontendInputs Include="$(SpaRoot)*.ts"/>
<FrontendInputs Include="$(SpaRoot)package.json"/>
<FrontendInputs Include="$(SpaRoot)vite.config.ts"/>
</ItemGroup>
<Target Name="BuildFrontend" BeforeTargets="BeforeBuild"
@@ -37,4 +39,11 @@
</ItemGroup>
</Target>
<Target Name="BeforeStaticWebAssets" BeforeTargets="ResolveProjectStaticWebAssets">
<ItemGroup>
<Content Include="wwwroot\dist\**" />
<Content Remove="wwwroot\dist\.vite\**" />
</ItemGroup>
</Target>
</Project>