const { exec } = require("child_process");
function compile(cb) {
//执行编译命令 gulp
let process = exec("layaair2-cmd compile");
process.stdout.on("data", (data) => {
console.log(data);
});
process.stderr.on("data", (data) => {
console.log(data);
});
process.on("exit", (code, signal) => {
console.log("success");
console.log(code, signal);
// cb();
})
}
var gulp = require('gulp'); //const { watch, task } = require("gulp"); 写法有问题