Skip to content

Commit

Permalink
fix: 完善开发文档 - 支持 serve、思源笔记插件、nginx、vercel 部署开发调试
Browse files Browse the repository at this point in the history
  • Loading branch information
terwer committed Feb 23, 2024
1 parent 5e5e92c commit 7b216b8
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 6 deletions.
2 changes: 2 additions & 0 deletions DEVELOPMENT.md
Expand Up @@ -52,6 +52,8 @@ artifacts structure
└── sy-post-publisher-widget-1.19.1.zip
```

Note: vercel is also supported via `pnpm vercelBuild`

## Sync to legacy widget repo

```bash
Expand Down
8 changes: 2 additions & 6 deletions vite.config.ts
Expand Up @@ -11,13 +11,11 @@ import { ElementPlusResolver } from "unplugin-vue-components/resolvers"
import { nodePolyfills } from "vite-plugin-node-polyfills"

// methods start
const getAppBase = (isSiyuanBuild: boolean, isWidgetBuild: boolean, isStaticBuild: boolean): string => {
const getAppBase = (isSiyuanBuild: boolean, isWidgetBuild: boolean): string => {
if (isSiyuanBuild) {
return "/plugins/siyuan-plugin-publisher/"
} else if (isWidgetBuild) {
return "/widgets/sy-post-publisher/"
} else if (isStaticBuild) {
return "/dist/"
} else {
return "/"
}
Expand Down Expand Up @@ -65,17 +63,15 @@ const outDir = args.o || args.outDir

const isSiyuanBuild = process.env.BUILD_TYPE === "siyuan"
const isWidgetBuild = process.env.BUILD_TYPE === "widget"
const isStaticBuild = process.env.BUILD_TYPE === "static"
// const isChromeBuild = process.env.BUILD_TYPE === "chrome"
const distDir = outDir || (isWidgetBuild ? "widget" : "./dist")
const appBase = getAppBase(isSiyuanBuild, isWidgetBuild, isStaticBuild)
const appBase = getAppBase(isSiyuanBuild, isWidgetBuild)

console.log("isWatch=>", isWatch)
console.log("debugMode=>", debugMode)
console.log("isDev=>", isDev)
console.log("distDir=>", distDir)
console.log("isSiyuanBuild=>", isSiyuanBuild)
console.log("isStaticBuild=>", isStaticBuild)

// https://github.com/vuejs/vue-cli/issues/1198
// https://vitejs.dev/config/
Expand Down

0 comments on commit 7b216b8

Please sign in to comment.