UNPKG
rapid
Version:
latest (3.1.1)
3.1.1
3.1.0
3.0.0
2.0.0
1.1.0
1.0.0
0.0.2
0.0.1
A simple tool for rapidly creating components
github.com/jonathantneal/rapid
jonathantneal/rapid
rapid
/
lib
/
exec.js
10 lines
(8 loc)
•
280 B
JavaScript
View Raw
1
2
3
4
5
6
7
8
9
10
// tooling
const
child_process =
require
(
'child_process'
);
// child_process.exec then-ified
module
.
exports
=
(
command, options
) =>
new
Promise
(
(
resolve, reject
) =>
child_process.
exec
(command, options,
(
error, stdout, stderr
) =>
error ?
reject
(stderr) :
resolve
(stdout) ) );