NOT CURRENTLY MAINTAINED AND MAY NOT WORK WITH THE LATEST VERSION OF NW.JS.
Sample nw.js app with all the boilerplate you need to just get started coding on your app with simple build scripts for Linux, Mac, and Windows.
Currently only Mac is fully supported. Linux is partially supported (run but not build) and Windows is not supported.
First, just download this code.
Then start hacking on your app and run it!
- Mac: open
dev/mac/start.command
. - Linux: open
dev/linux/start.sh
.
- Mac: open
dev/mac/build.command
. Fully-built .app files will be located in thebuild
directory. - Linux: open
dev/linux/build.sh
. This is a work in progress. Not fully functional yet.
To set the app's name, you need to replace the placeholder text in the following files:
All platforms:
main.html
: HTML page title sets window titledev/appname.txt
: sets the app's name on the task manager / dock (for builds only)
Mac only:
-
dev/mac/Info.plist
: sets app name in the native Mac menubar -
main.js
: see the line which readsnativeMenuBar.createMacBuiltin('App Name', { ...
to set the app's name in the native Mac menubar's menus -
bower.json
(bower doesn't allow name field to be empty)
To set the app icon, replace dev/appicon.png
with your app icon. A resolution of 1024x1024 or higher is recommended to support all OS and screen combinations.
To set the version of nw.js your app is built from, change the version number in dev/nwversion.txt
. See what the most recent version is here.
To set the architecture nw.js is targeting, change architecture number in dev/nwarch.txt
. Acceptable values are 32
and 64
.