安装Node.js
在
Packages/User
目录下新建文件Nodejs.sublime-build
{
"file_regex": "^[ ]*File \"(...*?)\", line ([0-9]*)",
"selector": "source.js",
"shell":true,
"windows":
{
"cmd": ["taskkill /F /IM node.exe; node $file"]
},
"linux":
{
"cmd": ["killall node >/dev/null 2>&1; node $file"]
},
"osx":
{
"cmd": ["killall node >/dev/null 2>&1; node $file"]
}
}