代码拉取完成,页面将自动刷新
这是一个练练手的项目,空闲时开发的个小工具,可以在mac上打开多个应用客户端
# 如果没有安装vue和vue-cli
npm install vue -g
npm install vue-cli -g
# 安装运行工具 如果安装慢
npm install electron -g
or
ELECTRON_MIRROR=https://npm.taobao.org/mirrors/electron/ npm install electron -g
# 安装打包工具
npm install -g electron-packager
# 安装模版
npm install -g electron-forge
# install dependencies
npm install
# serve with hot reload at localhost:9080
npm run dev
# build electron application for production
npm run build
# lint all JS/Vue component files in `src/`
npm run lint
#build mac platform
npm run build:mas
#build win platform
npm run build:win32
ELECTRON_MIRROR=https://npm.taobao.org/mirrors/electron/ npm run build
使用文档 https://www.electronjs.org/docs/api/frameless-window
具体操作如下
vue init simulatedgreg/electron-vue myproject
项目名称
? Application Name (myproject) 【输入名称或者点击enter】
?Application Name myproject
项目说明
? Project description(An electron-vue project)【 输入名称或者点击enter】
? Project description An electron-vue project
选择要安装的Vue插件(按<space>选择,<a>切换所有,<i>切换选择)
?Select which Vue plugins to install (Press <space> to select, <a> to toggle all, <i> to invert selection)
>(*) axios
(*) vue-electron
(*) vue-router
(*) vuex
【点击enter】
选择安装axios、vue- electronic、vue-router、vuex的vue插件
?Select which vue plugins to install axios, vue-electron, vue-router, vuex
是否添加ESlint (虽然加上eslink总是报错,但是eslint写出来的代码整体感觉还是非常不错的)
?Use linting with ESLint ?(Y/n) 【输入Y或者N,再点击enter】
?Use linting with ESLint No
使用karma + mocha建立单元测试 ( https://blog.csdn.net/violetjack0808/article/details/73740395 )
? Set up unit testing with karma + mocha ? (Y/n) 【输入Y或者N,再点击enter】
?Set up unit testing with karma + mocha Yes
使用Spectron + Mocha 建立端到端测试
? set up end-to-end testing with Spectron + Mocha ? (Y/n) 【输入Y或者N,再点击enter】
? set up end-to-end testing with Spectron + Mocha Yes
您希望使用什么构建工具?(用箭头键)
? What build tool would you like to use ? (Use arrow keys) 【输入enter确定】
> electron-builder ( https://github.com/electron-userland/electron-builder)
electron-packager ( https://github.com/electron-userland/electron-packager)
? What build tool would you like to use ? builder
author (github地址)(地址可以没有)
? author (LJH95224 <991538766@qq.com>) 【输入enter确定】
? author LJH95224 <991538766@qq.com>
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。