kylin-code/README.md

77 lines
1.3 KiB
Markdown
Raw Normal View History

2022-06-14 18:11:52 +08:00
1下载源码
2022-06-14 18:20:16 +08:00
2022-06-14 18:11:52 +08:00
git clone https://gitee.com/openkylin/kylin-code.git
2022-06-14 18:20:16 +08:00
2022-06-14 18:11:52 +08:00
2安装指定版本nodejs
2022-06-14 18:20:16 +08:00
2022-06-14 18:11:52 +08:00
版本要求:>=16.14.x and <17
2022-06-14 18:20:16 +08:00
2022-06-14 18:11:52 +08:00
获取地址https://nodejs.org/dist/
2022-06-14 18:20:16 +08:00
2022-06-14 18:11:52 +08:00
3安装yarn
2022-06-14 18:20:16 +08:00
2022-06-14 18:11:52 +08:00
yarn有版本要求如果未安装或提示版本不符。可以安装1.17.0
2022-06-14 18:20:16 +08:00
2022-06-14 18:11:52 +08:00
卸载yarn
2022-06-14 18:20:16 +08:00
2022-06-14 18:11:52 +08:00
npm uninstall yarn --global
2022-06-14 18:20:16 +08:00
2022-06-14 18:11:52 +08:00
安装:
2022-06-14 18:20:16 +08:00
2022-06-14 18:11:52 +08:00
npm install --global yarn@1.17.0
2022-06-14 18:20:16 +08:00
2022-06-14 18:11:52 +08:00
4C/C++ compiler tool chain
2022-06-14 18:20:16 +08:00
2022-06-14 18:11:52 +08:00
sudo apt-get update
2022-06-14 18:20:16 +08:00
2022-06-14 18:11:52 +08:00
sudo apt-get install build-essential g++ libx11-dev libxkbfile-dev libsecret-1-dev
5npm/yarn设置
2022-06-14 18:20:16 +08:00
2022-06-14 18:11:52 +08:00
设置淘宝镜像(解决下载electron慢的问题)
2022-06-14 18:20:16 +08:00
2022-06-14 18:11:52 +08:00
yarn config set registry http://registry.npm.taobao.org/
2022-06-14 18:20:16 +08:00
2022-06-14 18:11:52 +08:00
npm config set registry https://registry.npm.taobao.org
2022-06-14 18:20:16 +08:00
2022-06-14 18:11:52 +08:00
在项目根目录新建文件.npmrc
vim .npmrc
2022-06-14 18:20:16 +08:00
2022-06-14 18:11:52 +08:00
在其中添加 (注意,在.npmrc中必须小写在环境变量中是大写)
2022-06-14 18:20:16 +08:00
2022-06-14 18:11:52 +08:00
sass_binary_site=https://npm.taobao.org/mirrors/node-sass/
2022-06-14 18:20:16 +08:00
2022-06-14 18:11:52 +08:00
registry=https://registry.npm.taobao.org
2022-06-14 18:20:16 +08:00
2022-06-14 18:11:52 +08:00
electron_mirror=https://npm.taobao.org/mirrors/electron/
6安装依赖
2022-06-14 18:20:16 +08:00
2022-06-14 18:11:52 +08:00
cd kylin-code
2022-06-14 18:20:16 +08:00
2022-06-14 18:11:52 +08:00
yarn
2022-06-14 18:20:16 +08:00
2022-06-14 18:11:52 +08:00
7构建
2022-06-14 18:20:16 +08:00
2022-06-14 18:11:52 +08:00
yarn watch
8运行
2022-06-14 18:20:16 +08:00
2022-06-14 18:11:52 +08:00
./scripts/code.sh
9更换商店地址
2022-06-14 18:20:16 +08:00
2022-06-14 18:11:52 +08:00
源码目录下product.json
2022-06-14 18:20:16 +08:00
2022-06-14 18:11:52 +08:00
open vsx开源插件商店
2022-06-14 18:20:16 +08:00
2022-06-14 18:11:52 +08:00
"extensionsGallery": {
2022-06-14 18:20:16 +08:00
2022-06-14 18:11:52 +08:00
"serviceUrl": "https://open-vsx.org/vscode/gallery",
2022-06-14 18:20:16 +08:00
2022-06-14 18:11:52 +08:00
"itemUrl": "https://open-vsx.org/vscode/item"
2022-06-14 18:20:16 +08:00
2022-06-14 18:11:52 +08:00
},
2022-06-14 14:37:10 +08:00
2022-06-14 18:20:16 +08:00