1.安装vue-cli4脚手架工具
npm install -g @vue/cli
2.创建vue项目
vue create demo
3.安装vue-cli-plugin-electron-builder插件,安装可能需要挺长时间,要耐心等待一下
vue-cli-plugin-electron-builder官网:https://nklayman.github.io/vue-cli-plugin-electron-builder
//切换到项目目录下
cd demo
//安装vue-cli-plugin-electron-builder插件
vue add electron-builder
cd demo
//安装vue-cli-plugin-electron-builder插件
vue add electron-builder
4.运行程序(没安装yarn的,先安装yarn,执行这行命令安装:npm install -g yarn)
yarn electron:serve
5.打包生成应用
yarn electron:build