shelljs

155 阅读1分钟

shelljs 是一个可以在js代码中执行shell命令的包。

const sh = require('shelljs')
sh.exec('git commit -am "Auto-commit"')	// 执行git命令(同步执行)