Node-Webkit研究

收集入门文档,找到入门步骤

http://damoqiongqiu.iteye.com/blog/2010720

下载对应node-webkit版本:https://github.com/rogerwang/node-webkit

Create index.html:

1
2
3
4
5
6
7
8
9
<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>

Create package.json:

1
2
3
4
{
"name": "nw-demo",
"main": "index.html"
}

Run:
$ /path/to/nw . (suppose the current directory contains ‘package.json’)

Note: on Windows, you can drag the folder containing package.json to nw.exe to open it.

研究官方文档,了解具体架构

https://github.com/rogerwang/node-webkit

运行应用

直接在命令行参数中加上文件夹路径
把文件夹打成zip包改后缀名为nw再运行

下载代码,开发实例