我正在使用Brackets核心构建HTML,CSS和打字稿的桌面应用程序。 我的问题是:是否可以使用Node.js运行命令?我想将CD转到目录中,然后运行grunt serve。
我搜索了Google和Node网站,但找不到任何内容。
谢谢你
斯文
答案 0 :(得分:0)
http://nodejs.org/api/child_process.html
child_process.exec('shell command', {cwd: 'current work dir'}, function(err, stdout, stderr) {});