1.0.5 • Published 5 years ago
@jswork/next-node-exec v1.0.5
next-node-exec
Node exec for next.
installation
npm install -S @jswork/next-node-execusage
import '@jswork/next-node-exec';
// single cmd;
nx.nodeExec('npm run build');
// multiple cmds:
nx.nodeExec([
'ls -alh',
'pwd'
]);
// or with pip cmds
nx.nodeExec([
'tail access.log -n 1000',
`awk '{print $1}'`
], { joined: '|'});
//cmds: tail access.log -n 1000 | awk '{print $1}'options
| name | type | default | description |
|---|---|---|---|
| responseType | string | string/buffer/null | Return string with trim. |
| joined | string | &&/&/\| | Joined with char. |
| debug | boolean | true/false | If show the executed commands. |
license
Code released under the MIT license.