change publish logic.
This commit is contained in:
1 parent
27623a4e93
commit
ce2fa6eec7
6 files changed
+23
-13
No files matched your search
+1
-4
@@ -1,4 +1 @@
|
|||||||
interface DetailItem {
|
|
||||||
id: number;
|
|
||||||
name: string;
|
|
||||||
}
|
|
||||||
@@ -1,6 +1,4 @@
|
|||||||
/// <reference path="./global.d.ts" />
|
export interface ApiSuccess<T> {
|
||||||
|
|
||||||
export interface ApiSuccess<T> {
|
|
||||||
errorCode: 0;
|
errorCode: 0;
|
||||||
result: T;
|
result: T;
|
||||||
tag?: unknown;
|
tag?: unknown;
|
||||||
|
|||||||
@@ -1,7 +1,13 @@
|
|||||||
import { ApiError, fetchApi } from './helper';
|
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) {
|
if (container) {
|
||||||
try {
|
try {
|
||||||
const detail = await fetchApi<DetailItem>('api/detail?id=11');
|
const detail = await fetchApi<DetailItem>('api/detail?id=11');
|
||||||
|
|||||||
@@ -12,5 +12,3 @@ if (errorContainer instanceof HTMLElement) {
|
|||||||
const err = window.__SERVER_DATA__;
|
const err = window.__SERVER_DATA__;
|
||||||
errorContainer.innerText = `${err.errorCode}: ${err.errorMessage}`;
|
errorContainer.innerText = `${err.errorCode}: ${err.errorMessage}`;
|
||||||
}
|
}
|
||||||
|
|
||||||
export { }
|
|
||||||
@@ -4,7 +4,9 @@
|
|||||||
"vite.config.ts"
|
"vite.config.ts"
|
||||||
],
|
],
|
||||||
"compilerOptions": {
|
"compilerOptions": {
|
||||||
|
"lib": ["dom", "ES2015"],
|
||||||
"types": [ "node" ],
|
"types": [ "node" ],
|
||||||
|
"skipLibCheck": true,
|
||||||
"module": "esnext",
|
"module": "esnext",
|
||||||
"moduleResolution": "bundler"
|
"moduleResolution": "bundler"
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -5,23 +5,25 @@
|
|||||||
<Nullable>disable</Nullable>
|
<Nullable>disable</Nullable>
|
||||||
<ImplicitUsings>enable</ImplicitUsings>
|
<ImplicitUsings>enable</ImplicitUsings>
|
||||||
<OutputType>Exe</OutputType>
|
<OutputType>Exe</OutputType>
|
||||||
<StaticWebAssetsEnabled>false</StaticWebAssetsEnabled>
|
<UseAppHost>false</UseAppHost>
|
||||||
|
<PublishReadyToRun>true</PublishReadyToRun>
|
||||||
<SpaRoot>Source\</SpaRoot>
|
<SpaRoot>Source\</SpaRoot>
|
||||||
<FrontendStampFile>$(BaseIntermediateOutputPath)$(Configuration)\frontend_build.stamp</FrontendStampFile>
|
<FrontendStampFile>$(BaseIntermediateOutputPath)$(Configuration)\frontend_build.stamp</FrontendStampFile>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<Content Remove="Source\*.json" />
|
<Content Remove="Source\*.json" />
|
||||||
|
<Content Remove="wwwroot\dist\**" />
|
||||||
<None Include="Source\*.json" />
|
<None Include="Source\*.json" />
|
||||||
<None Update="Templates\**\*.html">
|
<None Update="Templates\**">
|
||||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||||
</None>
|
</None>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<FrontendInputs Include="$(SpaRoot)src\**"/>
|
<FrontendInputs Include="$(SpaRoot)src\**"/>
|
||||||
|
<FrontendInputs Include="$(SpaRoot)*.ts"/>
|
||||||
<FrontendInputs Include="$(SpaRoot)package.json"/>
|
<FrontendInputs Include="$(SpaRoot)package.json"/>
|
||||||
<FrontendInputs Include="$(SpaRoot)vite.config.ts"/>
|
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
<Target Name="BuildFrontend" BeforeTargets="BeforeBuild"
|
<Target Name="BuildFrontend" BeforeTargets="BeforeBuild"
|
||||||
@@ -37,4 +39,11 @@
|
|||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
</Target>
|
</Target>
|
||||||
|
|
||||||
|
<Target Name="BeforeStaticWebAssets" BeforeTargets="ResolveProjectStaticWebAssets">
|
||||||
|
<ItemGroup>
|
||||||
|
<Content Include="wwwroot\dist\**" />
|
||||||
|
<Content Remove="wwwroot\dist\.vite\**" />
|
||||||
|
</ItemGroup>
|
||||||
|
</Target>
|
||||||
|
|
||||||
</Project>
|
</Project>
|
||||||
Reference in new issue
Block a user