Tools --> Build System --> new Build System
-
在打开的文件中输入
{
"cmd": ["node", "$file"],
"file_regex": "^[ ]*File \"(...*?)\", line ([0-9]*)",
"working_dir": "${project_path:${folder}}",
"selector": "source.js",
"shell": true,
"encoding": "utf-8",
"windows": {
"cmd": ["node", "$file"]
}
}
-
如果系统不是64位的话,把window的cmd改成
"cmd": ["taskkill /f /im node.exe >nul 2>nul & node", "$file"]
-
先建一个js文件,之后ctrl+b就可以看到运行的结果了。
END
本文指导如何在特定环境中构建并运行JavaScript文件,包括设置命令、解析输出及注意事项,确保非64位系统下正确配置。
950

被折叠的 条评论
为什么被折叠?



