Skip to content

Instantly share code, notes, and snippets.

@dougio
Created January 13, 2014 02:51
Show Gist options
  • Save dougio/8393990 to your computer and use it in GitHub Desktop.
Save dougio/8393990 to your computer and use it in GitHub Desktop.
node-webkit has a bug on mac, that is it often lost keyboard focus if it is started from terminal such as node-webkit.app/Contents/MacOS/node-webkit "PACKAGE_DIR" but use "open" works fine. https://github.com/rogerwang/node-webkit/wiki/How-to-run-apps#mac-os-x
#!/usr/bin/env bash
if [[ -z $1 ]]
then
APP_PATH="./"
else
APP_PATH="$1"
fi
open -n -a node-webkit "$APP_PATH"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment