如何在sublime中运行node
作者:互联网
- 从官网安装 node.
- 打开sublime,工具->编译系统->新建编译系统
- 输入以下内容:
-
{ "cmd": ["node", "$file"], "file_regex": "^[ ]*File \"(...*?)\", line ([0-9]*)", "selector": "source.js", "shell":true, "encoding": "utf8", "windows": { "cmd": ["taskkill","/F", "/IM", "node.exe","&","node", "$file"] }, "linux": { "cmd": ["killall node; node", "$file"] }, "osx": { "cmd": ["killall node; node $file"] } }
- 保存文件,文件名是node.sublime-build.
标签:node,killall,cmd,sublime,file,编译系统,运行 来源: https://www.cnblogs.com/hujiaxin/p/12455016.html