Electron

Electron是将chromium和nodejs整合在一块儿,经过这个工具能够使用nodejs,html(5),css(3)建立跨平台的桌面程序;css


用web的开发方式,并且能和原生操做系统交互,建立跨windows、mac、linux平台的桌面程序,仍是颇有吸引力的;html


这种相似net的webbrowser,但webbrowser只支持ie内核更别说跨平台了、html5等新的标准了~~~html5

 

安装node

# Install the `electron` command globally
npm install electron-prebuilt -glinux

# Install as a development dependency
npm install electron-prebuilt --save-devweb

 

运行shell

electron .npm

 

打包windows

npm install -g asarapp

asar pack your-app app.asar

 

注意:包里面最好不要乱放东西,就放html,js,css,图片这些,而后把app.asar复制到atom-shell(或electron)目录下的resources里面,

而后直接双击electron.exe,你会发现打开的程序是你的,而不是本来默认的,还有这个asar的文件名必定是app;

相关文章
相关标签/搜索