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": {
|
"delayed-stream": {
|
||||||
"version": "1.0.0",
|
"version": "1.0.0",
|
||||||
"resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz",
|
"resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz",
|
||||||
|
@ -2079,6 +2082,9 @@
|
||||||
"integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=",
|
"integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=",
|
||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
|
"exec": {
|
||||||
|
"version": "file:lib/exec"
|
||||||
|
},
|
||||||
"exec-sh": {
|
"exec-sh": {
|
||||||
"version": "0.3.2",
|
"version": "0.3.2",
|
||||||
"resolved": "https://registry.npmjs.org/exec-sh/-/exec-sh-0.3.2.tgz",
|
"resolved": "https://registry.npmjs.org/exec-sh/-/exec-sh-0.3.2.tgz",
|
||||||
|
@ -2121,6 +2127,9 @@
|
||||||
"integrity": "sha1-BmDjUlouidnkRhKUQMJy7foktSk=",
|
"integrity": "sha1-BmDjUlouidnkRhKUQMJy7foktSk=",
|
||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
|
"exit": {
|
||||||
|
"version": "file:lib/exit"
|
||||||
|
},
|
||||||
"expand-brackets": {
|
"expand-brackets": {
|
||||||
"version": "2.1.4",
|
"version": "2.1.4",
|
||||||
"resolved": "https://registry.npmjs.org/expand-brackets/-/expand-brackets-2.1.4.tgz",
|
"resolved": "https://registry.npmjs.org/expand-brackets/-/expand-brackets-2.1.4.tgz",
|
||||||
|
|
|
@ -41,7 +41,10 @@
|
||||||
"arduino": "file:lib/arduino",
|
"arduino": "file:lib/arduino",
|
||||||
"async": "^2.6.1",
|
"async": "^2.6.1",
|
||||||
"capture": "file:lib/capture",
|
"capture": "file:lib/capture",
|
||||||
|
"delay": "file:lib/delay",
|
||||||
"display": "file:lib/display",
|
"display": "file:lib/display",
|
||||||
|
"exec": "file:lib/exec",
|
||||||
|
"exit": "file:lib/exit",
|
||||||
"ffmpeg": "file:lib/ffmpeg",
|
"ffmpeg": "file:lib/ffmpeg",
|
||||||
"ffprobe": "file:lib/ffprobe",
|
"ffprobe": "file:lib/ffprobe",
|
||||||
"fs-extra": "^7.0.1",
|
"fs-extra": "^7.0.1",
|
||||||
|
|
Loading…
Reference in New Issue