1.0.5 • Published 3 years ago

@jswork/next-node-exec v1.0.5

Weekly downloads
-
License
MIT
Repository
-
Last release
3 years ago

next-node-exec

Node exec for next.

version license size download

installation

npm install -S @jswork/next-node-exec

usage

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

nametypedefaultdescription
responseTypestringstring/buffer/nullReturn string with trim.
joinedstring&&/&/\|Joined with char.
debugbooleantrue/falseIf show the executed commands.

license

Code released under the MIT license.