build:修改搭建项目的依赖项

pull/376/head
AiMamba 2024-10-17 22:36:37 +08:00
parent 909aa21d00
commit 7fda471571
3 changed files with 10 additions and 4 deletions

View File

@ -367,15 +367,20 @@ git clone https://github.com/docmirror/dev-sidecar
cd dev-sidecar
# 注意不要使用 `npm install` 来安装依赖,因为 `lerna bootstrap` 会自动安装依赖
lerna bootstrap
# lerna bootstrap
# 如果 `lerna bootstrap` 有报错可以尝试执行如下两行命令用yarn替换掉npm
#cnpm install -g yarn
#lerna bootstrap --npm-client=yarn
# 感觉yarn的速度会更快
cnpm install -g yarn
lerna bootstrap --npm-client=yarn
# 运行DevSidecar
cd packages/gui
npm run electron
# 修改.yarnrc文件设置切换镜像源
registry=https://registry.npmmirror.com/
electron_mirror=https://npmmirror.com/mirrors/electron/
electron_builder_binaries_mirror=https://npmmirror.com/mirrors/electron-builder-binaries/
```
> 如果electron依赖包下载不动可以开启ds的npm加速

View File

@ -40,6 +40,7 @@
"node-forge": "^0.8.2",
"node-powershell": "^4.0.0",
"require-context": "^1.1.0",
"spawn-sync": "^2.0.0",
"through2": "^2.0.1",
"tunnel-agent": "^0.4.3",
"util": "^0.12.3",

View File

@ -3,7 +3,7 @@
"version": "1.8.6",
"private": false,
"license": "MPL-2.0",
"main": "background.js",
"main": "index.js",
"scripts": {
"serve": "vue-cli-service serve",
"lint": "vue-cli-service lint",