@lark-apaas/coding-templates 0.1.4 → 0.1.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lark-apaas/coding-templates",
3
- "version": "0.1.4",
3
+ "version": "0.1.5",
4
4
  "description": "OpenClaw project templates for mclaw CLI",
5
5
  "publishConfig": {
6
6
  "access": "public"
@@ -3,9 +3,11 @@ import { Layout } from "@/components/layout";
3
3
  import HomePage from "@/pages/home";
4
4
  import NotFoundPage from "@/pages/not-found";
5
5
 
6
+ declare const __APP_BASE_PATH__: string;
7
+
6
8
  export default function App() {
7
9
  return (
8
- <BrowserRouter>
10
+ <BrowserRouter basename={__APP_BASE_PATH__}>
9
11
  <Routes>
10
12
  <Route element={<Layout />}>
11
13
  <Route index element={<HomePage />} />
@@ -1,11 +1,11 @@
1
1
  export default function HomePage() {
2
2
  return (
3
- <div className="py-16 text-center">
4
- <h1 className="text-4xl font-bold tracking-tight sm:text-6xl mb-6">
5
- Welcome to OpenClaw
3
+ <div className="flex flex-col items-center justify-center py-24">
4
+ <h1 className="text-5xl font-bold tracking-tight sm:text-7xl mb-4">
5
+ 👋 Hello OpenClaw
6
6
  </h1>
7
- <p className="text-lg text-muted-foreground max-w-2xl mx-auto">
8
- Vite + React + Tailwind + shadcn/ui
7
+ <p className="text-lg text-muted-foreground">
8
+ Start building your app by editing <code className="px-1.5 py-0.5 rounded bg-muted font-mono text-sm">client/src/pages/home/index.tsx</code>
9
9
  </p>
10
10
  </div>
11
11
  );
@@ -8,6 +8,11 @@ export default defineConfig({
8
8
  root: path.resolve(__dirname, 'client'),
9
9
  base: process.env.MCLAW_CDN_DOMAIN || '/',
10
10
  plugins: [react(), tailwindcss()],
11
+ define: {
12
+ __APP_BASE_PATH__: JSON.stringify(
13
+ process.env.MCLAW_APP_ID ? `/app/${process.env.MCLAW_APP_ID}` : '/',
14
+ ),
15
+ },
11
16
  resolve: {
12
17
  alias: {
13
18
  '@': path.resolve(__dirname, 'client/src'),