Install delay, exit and exec modules.

This commit is contained in:
mmcwilliams 2019-02-08 14:07:35 -05:00
parent 9db61a7190
commit 0e618430ff
7 changed files with 67 additions and 0 deletions

9
app/lib/delay/index.js Normal file
View File

@ -0,0 +1,9 @@
'use strict';
function delay (ms) {
return new Promise((resolve) => {
setTimeout(resolve, ms);
});
}
module.exports = delay;

View File

@ -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"
}

11
app/lib/exec/package.json Normal file
View File

@ -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"
}

13
app/lib/exit/index.js Normal file
View File

@ -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;

11
app/lib/exit/package.json Normal file
View File

@ -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"
}

9
app/package-lock.json generated
View File

@ -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",

View File

@ -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",