Code repository: https://github.com/hilanmiao/LanMiaoDesktop
! ! ! npm-check is old, you can switch to npm-check-updates . The command is
ncu -u
, it only changes the content of the package.json file, you need to re-npm install
The official website of Electron-Vue Chinese introduction, there is a lot of content, read it from the beginning, there are many places to refer to these materials later.
https://simulatedgreg.gitbooks.io/electron-vue/content/cn/
Don't rush npm install first, because we need to upgrade some packages first.
1. Install Electron-vue and initialize
# 安装 vue-cli 和 脚手架样板代码
npm install -g vue-cli
vue init simulatedgreg/electron-vue my-project
# 安装依赖并运行你的程序
cd my-project
yarn # 或者 npm install
yarn run dev # 或者 npm run dev
The following is a screenshot of my installation, save trouble, ESLint, Test are not installed.
2. Install npm-check and upgrade some packages
npm install -g npm-check //全局安装
npm-check -u // 检查更新
The effect is as shown below, press the up and down arrows to select the package to be upgraded, and press the space to confirm the selection:
The most important thing is to upgrade the Electron package to 4.1.4, because there are some major updates, 5.0 will be released soon, and will be updated later.
I upgraded all the packages, hehehehe, some mistakes must be dealt with, don't follow me, I'm doing this, just upgrade the necessary packages.
3. Run
npm run dev
It is OK to display as shown above.