refactor: 模板占位符从 {{app-name}} 改为 my-app

This commit is contained in:
2026-05-20 14:15:14 +08:00
parent e2bf594719
commit 4a38d4dac7
12 changed files with 19 additions and 19 deletions

View File

@@ -43,7 +43,7 @@ export function parseRuntimeArgs(argv: string[] = Bun.argv.slice(2)): { configPa
if (argv.length === 0) return {};
const firstArg = argv[0];
if (firstArg === "--help" || firstArg === "-h") {
console.log("用法: {{app-name}} [config.yaml]");
console.log("用法: my-app [config.yaml]");
console.log(" config.yaml 可选 YAML 配置文件路径(不存在时使用默认配置)");
process.exit(0);
}

View File

@@ -18,7 +18,7 @@ export function createHeaders(mode: RuntimeMode, init: HeadersInit): Headers {
export function createHealthResponse(): HealthResponse {
return {
ok: true,
service: "{{app-name}}",
service: "my-app",
timestamp: new Date().toISOString(),
};
}

View File

@@ -32,7 +32,7 @@ export function startServer(options: StartServerOptions) {
},
});
console.log(`{{app-name}} listening on ${server.url}`);
console.log(`my-app listening on ${server.url}`);
return server;
}

View File

@@ -31,7 +31,7 @@ export function App() {
<Menu.HeadMenu
logo={
<span className="dashboard-brand">
<span className="dashboard-logo">{"{{app-name}}"}</span>
<span className="dashboard-logo">my-app</span>
</span>
}
operations={
@@ -50,7 +50,7 @@ export function App() {
<Content>
<div className="dashboard-content">
<Space direction="vertical" size="large" style={{ width: "100%" }}>
<h2>使 {"{{app-name}}"}</h2>
<h2>使 my-app</h2>
<p> /health API </p>
{health && <pre className="health-response">{JSON.stringify(health, null, 2)}</pre>}
</Space>

View File

@@ -3,7 +3,7 @@ import { useEffect, useState } from "react";
export type EffectiveTheme = "dark" | "light";
export type ThemePreference = "dark" | "light" | "system";
export const THEME_PREFERENCE_STORAGE_KEY = "{{app-name}}.theme.preference";
export const THEME_PREFERENCE_STORAGE_KEY = "my-app.theme.preference";
export const THEME_MEDIA_QUERY = "(prefers-color-scheme: dark)";
export function applyInitialThemePreference() {

View File

@@ -3,8 +3,8 @@
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta name="description" content="{{app-name}}" />
<title>{{app-name}}</title>
<meta name="description" content="my-app" />
<title>my-app</title>
</head>
<body>
<div id="root"></div>