Up and Running with NW.js on OS X

Formerly known as node-webkit, NW.js lets you convert pretty much any HTML5 project into a desktop app.

First, make sure you have the right versions of npm and node installed. I updated npm and ended up updating node via nvm to maintain various versions of node and getting the right one for NW.js.

To launch the test app, I ran this command via Terminal:

open -n -a nwjs --args "/Users/your_usr_name/path_to_project/html_nwjs_test"

There’re a few other options on the project’s Github page. Do check it out.

If your package.json has a “window” node that looks like what I have below (aka no window chrome, no taskbar functionality), keep in mind that on OS X you can just launch Activity Monitor and use that utility to shut your app down when you’re ready:

  "name": "HTML5 Desktop Test App",
  "main": "index.html",
  "window": {
    "title": "HTML5 Screensaver Test",
    "frame": false,
    "toolbar": false,
    "fullscreen": true,
    "always-on-top": true,
    "show_in_taskbar": false

I’m sure Windows Task Manager or Windows Explorer has a similar option.

When the app’s ready, nw-builder seems like a good option to create executables for multiple platforms (win32, win64, osx32, osx64, linux, etc). It seems a bit annoying that for Windows, nw-builder outputs a bunch of .dll files along with the .exe.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s