Ubuntu Electron

Ubuntu 16.04 TLS

1 sudo apt-get install nodejs
2 sudo apt install nodejs-legacy
3 sudo apt install npm

Ubuntu 18.04 TLS

1 sudo apt-get install nodejs
2 sudo apt install libssl1.0-dev nodejs-dev node-gyp npm
1 sudo npm config set registry https://registry.npm.taobao.org
2 sudo npm config list
1 sudo npm install n -g
2 sudo n stable
1 sudo npm install -g cnpm --registry=https://registry.npm.taobao.org 
2 sudo cnpm install -g electron
1 # 克隆这仓库
2 git clone https://github.com/electron/electron-quick-start
3 # 进入仓库
4 cd electron-quick-start
5 # 安装依赖库
6 cnpm install
7 # 运行应用
8 cnpm start
 1 node -v
 2 v14.2.0
 3 安装最新版本,curl -sL https://deb.nodesource.com/setup_14.x | sudo -E bash -
 4 electron-forge -V
 5 5.2.4
 6 
 7 npm -v
 8 6.14.5
 9 
10 electron -v
11 v8.2.3

安装Electron-vue

 1 # 如果你没有vue-cli的话需要全局安装
 2 npm install -g vue-cli
 3 # 然后使用vue-cli来安装electron-vue的模板
 4 vue init simulatedgreg/electron-vue my-project
 5 
 6 # 安装依赖
 7 cd my-project
 8 yarn # or npm install
 9 # 进入开发模式
10 yarn run dev # or npm run dev

 

posted @ 2020-04-24 00:27  doubletcjs  阅读(531)  评论(0编辑  收藏  举报