update
This commit is contained in:
28
.github/workflows/deploy.yaml
vendored
Normal file
28
.github/workflows/deploy.yaml
vendored
Normal file
@@ -0,0 +1,28 @@
|
||||
name: Deploy
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
|
||||
jobs:
|
||||
build-and-deploy:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: 22
|
||||
cache: npm
|
||||
- run: npm install
|
||||
- run: CI=false npm run build
|
||||
|
||||
- uses: easingthemes/ssh-deploy@main
|
||||
with:
|
||||
SSH_PRIVATE_KEY: ${{ secrets.KEY }}
|
||||
REMOTE_HOST: ${{ secrets.HOST }}
|
||||
ARGS: "-avzr --delete"
|
||||
SOURCE: dist/
|
||||
REMOTE_USER: root
|
||||
TARGET: /root/WebPreview/build
|
||||
@@ -1,5 +1 @@
|
||||
# Vue 3 + TypeScript + Vite
|
||||
|
||||
This template should help get you started developing with Vue 3 and TypeScript in Vite. The template uses Vue 3 `<script setup>` SFCs, check out the [script setup docs](https://v3.vuejs.org/api/sfc-script-setup.html#sfc-script-setup) to learn more.
|
||||
|
||||
Learn more about the recommended Project Setup and IDE Support in the [Vue Docs TypeScript Guide](https://vuejs.org/guide/typescript/overview.html#project-setup).
|
||||
web preview
|
||||
@@ -4,11 +4,10 @@
|
||||
<meta charset="UTF-8" />
|
||||
<link rel="shortcut icon" href="/favicon.ico" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
<title>前端开发网站</title>
|
||||
<title>前端开发预览网站</title>
|
||||
<link rel="stylesheet" href="/style.css" />
|
||||
</head>
|
||||
<body>
|
||||
<div id="app"></div>
|
||||
<script type="module" src="/src/main.ts"></script>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
2034
package-lock.json
generated
2034
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
11
package.json
11
package.json
@@ -4,8 +4,8 @@
|
||||
"version": "0.0.0",
|
||||
"type": "module",
|
||||
"scripts": {
|
||||
"start": "vite",
|
||||
"build": "vue-tsc -b && vite build",
|
||||
"start": "rsbuild dev",
|
||||
"build": "rsbuild build",
|
||||
"fmt": "prettier --write src/"
|
||||
},
|
||||
"dependencies": {
|
||||
@@ -21,11 +21,10 @@
|
||||
},
|
||||
"devDependencies": {
|
||||
"@codemirror/state": "^6.5.2",
|
||||
"@vitejs/plugin-vue": "^5.2.1",
|
||||
"@rsbuild/core": "^1.2.11",
|
||||
"@rsbuild/plugin-vue": "^1.0.6",
|
||||
"@vue/tsconfig": "^0.7.0",
|
||||
"prettier": "^3.5.2",
|
||||
"typescript": "^5.7.3",
|
||||
"vite": "^6.1.1",
|
||||
"vue-tsc": "^2.2.2"
|
||||
"typescript": "^5.7.3"
|
||||
}
|
||||
}
|
||||
|
||||
23
rsbuild.config.ts
Normal file
23
rsbuild.config.ts
Normal file
@@ -0,0 +1,23 @@
|
||||
import { defineConfig } from "@rsbuild/core"
|
||||
import { pluginVue } from "@rsbuild/plugin-vue"
|
||||
|
||||
export default defineConfig({
|
||||
plugins: [pluginVue()],
|
||||
html: {
|
||||
template: "./index.html",
|
||||
},
|
||||
source: {
|
||||
entry: {
|
||||
index: "./src/main.ts",
|
||||
},
|
||||
},
|
||||
performance: {
|
||||
chunkSplit: {
|
||||
strategy: "split-by-experience",
|
||||
forceSplitting: {
|
||||
"lib-ui": /node_modules[\\/]naive-ui/,
|
||||
"lib-cm": /node_modules[\\/]@codemirror/,
|
||||
},
|
||||
},
|
||||
},
|
||||
})
|
||||
@@ -3,7 +3,7 @@ import { darkTheme, dateZhCN, zhCN } from "naive-ui"
|
||||
import { useDark, useMagicKeys, whenever } from "@vueuse/core"
|
||||
import Editor from "./components/Editor.vue"
|
||||
import Preview from "./components/Preview.vue"
|
||||
import { html, css } from "./store.ts"
|
||||
import { html, css, js } from "./store.ts"
|
||||
|
||||
const isDark = useDark()
|
||||
|
||||
@@ -39,9 +39,9 @@ whenever(ctrl_r, () => {})
|
||||
<n-tab-pane name="css" tab="CSS">
|
||||
<Editor language="css" v-model:value="css" />
|
||||
</n-tab-pane>
|
||||
<!-- <n-tab-pane name="js" tab="JS">
|
||||
<n-tab-pane name="js" tab="JS">
|
||||
<Editor language="js" v-model:value="js" />
|
||||
</n-tab-pane> -->
|
||||
</n-tab-pane>
|
||||
</n-tabs>
|
||||
</template>
|
||||
<template #2>
|
||||
|
||||
@@ -20,5 +20,5 @@
|
||||
"noFallthroughCasesInSwitch": true,
|
||||
"noUncheckedSideEffectImports": true
|
||||
},
|
||||
"include": ["vite.config.ts"]
|
||||
"include": ["rsbuild.config.ts"]
|
||||
}
|
||||
|
||||
@@ -1,7 +0,0 @@
|
||||
import { defineConfig } from 'vite'
|
||||
import vue from '@vitejs/plugin-vue'
|
||||
|
||||
// https://vite.dev/config/
|
||||
export default defineConfig({
|
||||
plugins: [vue()],
|
||||
})
|
||||
Reference in New Issue
Block a user