我是靠谱客的博主 辛勤帽子,这篇文章主要介绍node-webkit使用教程,现在分享给大家,希望可以做个参考。

源码下载

https://codeload.github.com/rogerwang/node-webkit/zip/master

可执行文件下载

Linux: 

[32bit]

(https://s3.amazonaws.com/node-webkit/v0.7.5/node-webkit-v0.7.5-linux-ia32.tar.gz) 

[64bit] (https://s3.amazonaws.com/node-webkit/v0.7.5/node-webkit-v0.7.5-linux-x64.tar.gz)

Windows: 

[win32]

(https://s3.amazonaws.com/node-webkit/v0.7.5/node-webkit-v0.7.5-win-ia32.zip)

Mac: 

[32bit, 10.7+]

(https://s3.amazonaws.com/node-webkit/v0.7.5/node-webkit-v0.7.5-osx-ia32.zip)

Sample apps for node-webkit

https://codeload.github.com/zcbenz/nw-sample-apps/zip/master

 

参考资料:https://speakerdeck.com/player/505334438282a9000204188a?#

Quick Start(One Demo)

(1)Create the folder named ‘hello-world’,enter the folder;

(2)Create ‘index.html’,input

<!DOCTYPE html>

<html>

  <head>

    <title>Hello World!</title>

  </head>

  <body>

    <h1>Hello World!</h1>

    We are using node.js <script>document.write(process.version)</script>.

  </body>

</html>

(3)Create `package.json`,input

{

  "name": "HelloWorld",

  "main": "index.html",

  "window": {

    "toolbar": false,

    "width": 660,

    "height": 500

  }

}

(4)Compress `index.html` and `package.json` into a zip archive called `hello-world.nw`;

(5)put `hello-world.nw` to the folder named `node-webkit-v0.7.5-win-ia32`;

(6)generate xxx.exe

copy /b nw.exe+hello-world.nw hello-world.exe

最后

以上就是辛勤帽子最近收集整理的关于node-webkit使用教程的全部内容,更多相关node-webkit使用教程内容请搜索靠谱客的其他文章。

本图文内容来源于网友提供,作为学习参考使用,或来自网络收集整理,版权属于原作者所有。
点赞(56)

评论列表共有 0 条评论

立即
投稿
返回
顶部