UNPKG
cordova-sync
Version:
latest (1.0.1)
1.0.1
1.0.0
Respond to file changes and build Cordova application
cordova-sync
/
utils
/
exec.js
13 lines
(10 loc)
•
305 B
JavaScript
View Raw
1
2
3
4
5
6
7
8
9
10
11
12
13
const
exec =
require
(
'child_process'
).
exec
function
execute
(
command, cwd
) {
return
new
Promise
(
(
res, rej
) =>
{
exec
(command, { cwd,
maxBuffer
:
1024
*
500
},
function
(
error, stdout, stderr
) {
if
(error)
return
rej
(error)
res
({ stdout, stderr }) }) }) }
module
.
exports
= execute