Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/afeiship/next-node-exec
Node exec for next.
https://github.com/afeiship/next-node-exec
array cmd exec exec-sync multiple next node response-type string sync trim
Last synced: 8 days ago
JSON representation
Node exec for next.
- Host: GitHub
- URL: https://github.com/afeiship/next-node-exec
- Owner: afeiship
- License: mit
- Created: 2019-06-20T02:25:52.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2021-01-09T08:20:55.000Z (almost 4 years ago)
- Last Synced: 2024-10-12T14:27:06.885Z (2 months ago)
- Topics: array, cmd, exec, exec-sync, multiple, next, node, response-type, string, sync, trim
- Language: JavaScript
- Homepage:
- Size: 29.3 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.txt
Awesome Lists containing this project
README
# next-node-exec
> Node exec for next.[![version][version-image]][version-url]
[![license][license-image]][license-url]
[![size][size-image]][size-url]
[![download][download-image]][download-url]## installation
```bash
npm install -S @jswork/next-node-exec
```## usage
```js
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](https://github.com/afeiship/next-node-exec/blob/master/LICENSE.txt).[version-image]: https://img.shields.io/npm/v/@jswork/next-node-exec
[version-url]: https://npmjs.org/package/@jswork/next-node-exec[license-image]: https://img.shields.io/npm/l/@jswork/next-node-exec
[license-url]: https://github.com/afeiship/next-node-exec/blob/master/LICENSE.txt[size-image]: https://img.shields.io/bundlephobia/minzip/@jswork/next-node-exec
[size-url]: https://github.com/afeiship/next-node-exec/blob/master/dist/next-node-exec.min.js[download-image]: https://img.shields.io/npm/dm/@jswork/next-node-exec
[download-url]: https://www.npmjs.com/package/@jswork/next-node-exec