##Instalation
First we need to locate our node binary
$ which node
/usr/local/bin/node
Then in sublime text we go to Tools > Build System > New Build System ...
Replace what comes for default with this:
{
"cmd": ["node", "$file"],
"path": "/usr/local/bin/",
"selector": "source.js"
}
Where path is the path to where the node binary is located.
##Usage
Now when you are on a .js
file, just use the build hotkey (on OSX is command+B) and you'll see the results on the build screen on sublime (bottom part).
##Side notes
You can play and change the binary, to coffee
or nodeunit
or even nodemon
...
##Caveats
Only works on saved files, you cannot use this on buffer.
Colors are not supported on the sublime console.