docs: replace manual install with tiged starter in Getting Started
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -39,56 +39,21 @@ export default defineComponent({
|
|||||||
</template>
|
</template>
|
||||||
```
|
```
|
||||||
|
|
||||||
## Install
|
|
||||||
|
|
||||||
```bash
|
|
||||||
npm install @vue-tui/runtime vue
|
|
||||||
npm install -D @vue-tui/cli @vitejs/plugin-vue vite
|
|
||||||
```
|
|
||||||
|
|
||||||
## Getting Started
|
## Getting Started
|
||||||
|
|
||||||
**`src/main.ts`**
|
```bash
|
||||||
|
npx tiged vuejs-ai/vue-tui-starter my-app
|
||||||
```ts
|
cd my-app
|
||||||
import { createApp } from "@vue-tui/runtime";
|
npm install
|
||||||
import App from "./App.vue";
|
npm run dev
|
||||||
|
|
||||||
createApp(App).mount();
|
|
||||||
```
|
```
|
||||||
|
|
||||||
**`vite.config.ts`**
|
That's it — edit `src/App.vue` and see changes instantly with HMR.
|
||||||
|
|
||||||
```ts
|
To build and run:
|
||||||
import { defineConfig } from "vite";
|
|
||||||
import vue from "@vitejs/plugin-vue";
|
|
||||||
|
|
||||||
export default defineConfig({
|
|
||||||
plugins: [vue()],
|
|
||||||
build: {
|
|
||||||
target: "node22",
|
|
||||||
lib: {
|
|
||||||
entry: "src/main.ts",
|
|
||||||
formats: ["es"],
|
|
||||||
fileName: () => "app.mjs",
|
|
||||||
},
|
|
||||||
rollupOptions: {
|
|
||||||
external: (id) => !id.startsWith(".") && !id.startsWith("/") && !id.startsWith("\0"),
|
|
||||||
},
|
|
||||||
},
|
|
||||||
});
|
|
||||||
```
|
|
||||||
|
|
||||||
Run in development with HMR:
|
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
npx vue-tui dev
|
npm run preview
|
||||||
```
|
|
||||||
|
|
||||||
Build and run:
|
|
||||||
|
|
||||||
```bash
|
|
||||||
npx vite build && node dist/app.mjs
|
|
||||||
```
|
```
|
||||||
|
|
||||||
## Components
|
## Components
|
||||||
|
|||||||
Reference in New Issue
Block a user