Install delay, exit and exec modules.
This commit is contained in:
parent
9db61a7190
commit
0e618430ff
|
@ -0,0 +1,9 @@
|
|||
'use strict';
|
||||
|
||||
function delay (ms) {
|
||||
return new Promise((resolve) => {
|
||||
setTimeout(resolve, ms);
|
||||
});
|
||||
}
|
||||
|
||||
module.exports = delay;
|
|
@ -0,0 +1,11 @@
|
|||
{
|
||||
"name": "delay",
|
||||
"version": "1.0.0",
|
||||
"description": "",
|
||||
"main": "index.js",
|
||||
"scripts": {
|
||||
"test": "echo \"Error: no test specified\" && exit 1"
|
||||
},
|
||||
"author": "",
|
||||
"license": "ISC"
|
||||
}
|
|
@ -0,0 +1,11 @@
|
|||
{
|
||||
"name": "exec",
|
||||
"version": "1.0.0",
|
||||
"description": "<a name=\"exec\"></a>",
|
||||
"main": "index.js",
|
||||
"scripts": {
|
||||
"test": "echo \"Error: no test specified\" && exit 1"
|
||||
},
|
||||
"author": "",
|
||||
"license": "ISC"
|
||||
}
|
|
@ -0,0 +1,13 @@
|
|||
'use strict';
|
||||
|
||||
function exit (msg, code = 0) {
|
||||
if (code === 0) {
|
||||
console.log(msg);
|
||||
process.exit();
|
||||
} else {
|
||||
console.error(msg);
|
||||
process.exit(code);
|
||||
}
|
||||
}
|
||||
|
||||
module.exports = exit;
|
|
@ -0,0 +1,11 @@
|
|||
{
|
||||
"name": "exit",
|
||||
"version": "1.0.0",
|
||||
"description": "",
|
||||
"main": "index.js",
|
||||
"scripts": {
|
||||
"test": "echo \"Error: no test specified\" && exit 1"
|
||||
},
|
||||
"author": "",
|
||||
"license": "ISC"
|
||||
}
|
|
@ -1458,6 +1458,9 @@
|
|||
}
|
||||
}
|
||||
},
|
||||
"delay": {
|
||||
"version": "file:lib/delay"
|
||||
},
|
||||
"delayed-stream": {
|
||||
"version": "1.0.0",
|
||||
"resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz",
|
||||
|
@ -2079,6 +2082,9 @@
|
|||
"integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=",
|
||||
"dev": true
|
||||
},
|
||||
"exec": {
|
||||
"version": "file:lib/exec"
|
||||
},
|
||||
"exec-sh": {
|
||||
"version": "0.3.2",
|
||||
"resolved": "https://registry.npmjs.org/exec-sh/-/exec-sh-0.3.2.tgz",
|
||||
|
@ -2121,6 +2127,9 @@
|
|||
"integrity": "sha1-BmDjUlouidnkRhKUQMJy7foktSk=",
|
||||
"dev": true
|
||||
},
|
||||
"exit": {
|
||||
"version": "file:lib/exit"
|
||||
},
|
||||
"expand-brackets": {
|
||||
"version": "2.1.4",
|
||||
"resolved": "https://registry.npmjs.org/expand-brackets/-/expand-brackets-2.1.4.tgz",
|
||||
|
|
|
@ -41,7 +41,10 @@
|
|||
"arduino": "file:lib/arduino",
|
||||
"async": "^2.6.1",
|
||||
"capture": "file:lib/capture",
|
||||
"delay": "file:lib/delay",
|
||||
"display": "file:lib/display",
|
||||
"exec": "file:lib/exec",
|
||||
"exit": "file:lib/exit",
|
||||
"ffmpeg": "file:lib/ffmpeg",
|
||||
"ffprobe": "file:lib/ffprobe",
|
||||
"fs-extra": "^7.0.1",
|
||||
|
|
Loading…
Reference in New Issue