我正在使用 Brackets 核心使用 HTML、CSS 和 Typescript 构建桌面应用程序。 我的问题是:是否可以使用 Node.js 运行命令?我想进入 CD 目录,然后运行 gruntserve。
我搜索了 Google 和 Node 网站,但没有找到任何内容。
谢谢你
斯文
最佳答案
http://nodejs.org/api/child_process.html
child_process.exec('shell command', {cwd: 'current work dir'}, function(err, stdout, stderr) {});
关于javascript - 使用 NodeJS 在特定目录中运行命令,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/25963731/