Skip to content

Instantly share code, notes, and snippets.

@yashprit
Last active August 29, 2015 14:08
Show Gist options
  • Save yashprit/9f2b31657f2e06b6098c to your computer and use it in GitHub Desktop.
Save yashprit/9f2b31657f2e06b6098c to your computer and use it in GitHub Desktop.
Node Webkit local development

Text taken from here

Sublime Text 2 is a great cross-platform editor for building node-webkit apps, you can download it here:

###Mac OS X

Download node-webkit.app and place it in /Applications folder From the Sublime Text 2 menu select Tools -> Build System -> New Build System Enter the following code:

{
    "cmd": ["node-webkit", "--enable-logging", "${project_path:${file_path}}"],
    "working_dir": "${project_path:${file_path}}",
    "path": "/Applications/node-webkit.app/Contents/MacOS/"
}

Open a new window in Sublime Text 2 using File -> New Window Add your project to the window using Project -> Add Folder to Project... Open your main package.json from the left side menu and select Tools -> Build At this point node-webkit application will launch with your project and you will be able to see the debugging output in Sublime Text 2 Work the same with Sublime Text 3.

###Windows

As above, but the commands for the build system are as follows (replacing the path with the location of nw.exe):

{
    "cmd": ["nw.exe", "--enable-logging", "${project_path:${file_path}}"],
    "working_dir": "${project_path:${file_path}}",
    "path": "C:/Tools/node-webkit/",
    "shell": true
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment