0%

npm库-execa

execa: 比 child_process 更好用的执行 shell 脚本的工具

execa-exp.js

1
2
3
const jiti = require('jiti')();

jiti('./');

index.ts

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
import { execa } from 'execa';



(async () => {

{

const { stdout } = await execa('ls', ['-al', '.']);

console.log(stdout);

}

})();
52c22e4a-02a2-4f6d-8053-219fa134a725