0
votes

I started experimenting with nwjs ( node-webkit ) . But i seem to be doing something wrong i have 2 file in a folder : index.html

<!DOCTYPE html>
<html>
<head>
<title>Hello Node Webkit</title>
</head>
<body>
<h1>Hello Node Webkit</h1>
</body>
</html>

package.json

{
  "name": "myapp.helloworldapp",
  "version": "1.0.0",
  "description": "A test app",
  "main": "index.html",
  "scripts": {
    "test": "echo \"Error: no test specified\" && exit 1"
  },
  "author": "",
  "license": "MIT"
}

i zip up both files at ones ( i don't zip the folder ) and i rename the extention from .zip to .nw but nothing happens when i try to open it with the nwjs app .

i'm working from a mac if that could have something to do with it ?

1
It work with older version of node-webkit, but doesn't work with new node-webkit including nwjs 0.12 - Pavel Evstigneev
For me it works with node 0.9.1 but not works with 0.11 - Pavel Evstigneev
Confirmed 0.9.1 does show my .nw file . - Kevin G

1 Answers

0
votes

I would follow the steps outlined in their docs.

From the command line:

  • Go to your project directory a la cd ~/Projects/my_app
  • Run zip -r ../${PWD##*/}.nw *
  • Your fully-prepared .nw file shall be located right outside of your project directory
  • Cake!