如何从js文件运行npm funct
最佳答案
是的,您可以这样做,下面是代码:
var execSync = require('child_process').execSync;
var list = execSync('yarn list', { encoding: 'utf-8' });
console.log(list);
关于javascript - 从js文件运行npm functs,我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/51535469/