ELECTRON 学习三
今天做一个雪花飘落
第一步:npm init
第二步:安装electron
npm config set registry http://registry.npm.taobao.org/
cnpm install electron -g(注意安装版本)
"devDependencies": { "electron": "^6.1.4", "electron-packager": "13.0.1" }
第三步:新建main.js
mainWindow = new BrowserWindow({ title: ‘hello Electron‘, width: 800, height: 500, frame: false, transparent: true });
mainWindow.loadURL(‘file://‘ + __dirname + ‘/src//index.html‘);
第四步:新建index.html
雪花参考作品:http://www.jq22.com/code2752
第五步:运行
"scripts": { "test": "echo \"Error: no test specified\" && exit 1", "start": "electron .", "pack": "electron-packager . Electron_Snow --win --out ../Electron_Snow --arch=x64 --app-version=0.0.1 --electron-version=6.1.4" },
cnpm run start
相关推荐
游走的豚鼠君 2020-11-10
sanallen 2020-07-04
electronvolt 2020-07-04
sanallen 2020-06-14
moyigg 2020-06-09
疯狂老司机 2020-06-07
zhujuyu 2020-06-06
moyigg 2020-06-01
zhujuyu 2020-05-30
viewerlin 2020-05-29
zhujuyu 2020-05-28
yanchuncheng 2020-05-12
Trustport 2020-05-06
chenyijun 2020-05-05
electronvolt 2020-05-04
游走的豚鼠君 2020-05-01
electronvolt 2020-04-21
游走的豚鼠君 2020-04-18