Skip to content

Latest commit

 

History

History
95 lines (64 loc) · 1.52 KB

DEVELOPMENT_zh_CN.md

File metadata and controls

95 lines (64 loc) · 1.52 KB

开发指南

准备工作

pnpm install

使用阿里云私有镜像仓库

docker pull node:18-alpine
docker images
docker tag a1f1d32cdee7 registry.cn-shenzhen.aliyuncs.com/terwer/dm:node-18-alpine
docker login --username=terwer@aliyun.com registry.cn-shenzhen.aliyuncs.com
docker push registry.cn-shenzhen.aliyuncs.com/terwer/dm:node-18-alpine

开发

启动开发服务器

pnpm build -F @terwer/share-pro-app -- --from siyuan
pnpm build -F siyuan-blog
pnpm makeLink
pnpm build -F siyuan-blog -- --watch

# http://localhost:6806/plugins/siyuan-blog/app/#/s/20241217142133-o580ytq
# http://localhost:6806/plugins/siyuan-blog/app/#/s/20241217142133-o580ytq?lang=en_US

构建和链接

pnpm makeLink
pnpm build -F @terwer/share-pro-app -- --from siyuan
pnpm build -F siyuan-blog -- --watch

构建

为思源笔记构建

pnpm build -F @terwer/share-pro-app -- --from siyuan

为 Node.js 构建

pnpm build -F @terwer/share-pro-app -- --from node
# 对于根路径 /
node ./dist/node/server/index.mjs
# 自定义前缀,例如:/blog
NUXT_APP_BASE_URL=blog node ./dist/node/server/index.mjs

为 Vercel 构建

# 根目录:apps/app
# 构建命令
pnpm vercelBuild

为 Cloudflare 构建

# 根目录:apps/app
# 构建命令
pnpm cloudflareBuild

打包

pnpm package

打包后的文件结构

├── build
  ├── package.zip
  ├── siyuan-plugin-blog-5.4.0.zip