The template is based on Durandal html starter kit (link).
Key information can be found in the following files:
-
lib/app/app.js: Initiates the Node-Webkit window and sets the requireNode object.
-
package.json: Includes the application metadata and properties. Note: Rename this file when using the npm to install new modules; subsequently, reset the name.
-
viewmodels/leverage-node-modules-example.js: Shows how to use the requireNode object to require the "util" node-module.
The description for using the node-webkit in osx, linux, and windows can be found here.
In osx, you can run the application by following these steps:
- Open the terminal.
- Paste the path to "lib/node-webkit-v0.11.5-osx-x64/node-webkit.app/Contents/MacOS/node-webkit.
- Add a space at the end of step 2 (after the node-webkit).
- Paste the path to the application folder (Durandal-Node-Webkit-Template) after the space in step 2.
- Click the enter key on the keyboard.
This template was developed using Webstorm JavaScript IDE (link), which makes it easier to run and debug node-webkit applications (link).
References:
-
Node-Webkit/NW.js Site:
https://github.com/rogerwang/node-webkit -
Durandal html starter kit:
http://durandaljs.com/get-started.html -
Webstorm JavaScript IDE:
https://www.jetbrains.com/webstorm/
https://www.jetbrains.com/webstorm/help/run-debug-configuration-node-webkit.html