Skip to content

afeiship/next-node-exec

Repository files navigation

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

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.