ども yajamonです
node-webkit が nw.js に改名して、io.js をベースにするらしく。 せっかくなので最新版を用意して、作業メモを残します。
環境
- Windows7 64bit
- Node.js インストール済
用意
以下のものをインストールします。
- io.js 1.0.3
- nw.js 0.12.0-alpha2
io.jsのインストール
- 公式サイト(https://iojs.org/)からインストーラをGet
- 流れ作業的にインストール
- 環境変数:Pathからnode.jsのパスを取り除く
nw.jsの展開
- 公式サイト(http://nwjs.io/)からアーカイブをGet
- パッケージを展開する
- 環境変数:Pathにnw.jsへのパスを追加
動かしてみる
以下に追加していく
nw-start > tree . └─src
./src/index.html
ペライチのhtml
<!DOCTYPE html> <html> <head> <meta charset="utf-8"> <title>nw-start</title> </head> <body> <h1>Hello world!</h1> io.js version is <script>document.write(process.version)</script> </body> </html>
./src/package.json
nw.js が構成を読み解くためのjson設定ファイル
{ "name": "sample", "main": "index.html" }
実行
nw-start > nw.exe .\src
動いた
気を使うところ
package.json が npm とぶつかりそうなので、srcディレクトリは切ったほうがいいと思う