refactor: 模板占位符从 {{app-name}} 改为 my-app
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
@@ -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(),
|
||||
};
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -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() {
|
||||
|
||||
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user