Add type definitions
This commit is contained in:
@ -1,7 +1,7 @@
|
|||||||
// tslint:disable:no-console
|
// tslint:disable:no-console
|
||||||
import * as fs from "fs";
|
import fs from "fs";
|
||||||
import * as prompt from "prompt";
|
import prompt from "prompt";
|
||||||
import * as shelljs from "shelljs";
|
import shelljs from "shelljs";
|
||||||
|
|
||||||
console.log("What demo do you wish to run? (Enter a number)");
|
console.log("What demo do you wish to run? (Enter a number)");
|
||||||
|
|
||||||
@ -17,8 +17,8 @@ const schema = {
|
|||||||
|
|
||||||
prompt.start();
|
prompt.start();
|
||||||
|
|
||||||
prompt.get(schema, (_, result) => {
|
prompt.get(schema as any, (_, result) => {
|
||||||
const demoNumber = result.number;
|
const demoNumber = result.number as string;
|
||||||
const files = fs.readdirSync("./demo").filter((fn) => fn.startsWith(demoNumber));
|
const files = fs.readdirSync("./demo").filter((fn) => fn.startsWith(demoNumber));
|
||||||
|
|
||||||
if (files.length === 0) {
|
if (files.length === 0) {
|
||||||
|
26
package-lock.json
generated
26
package-lock.json
generated
@ -649,6 +649,16 @@
|
|||||||
"resolved": "https://registry.npmjs.org/@types/node/-/node-16.10.1.tgz",
|
"resolved": "https://registry.npmjs.org/@types/node/-/node-16.10.1.tgz",
|
||||||
"integrity": "sha512-4/Z9DMPKFexZj/Gn3LylFgamNKHm4K3QDi0gz9B26Uk0c8izYf97B5fxfpspMNkWlFupblKM/nV8+NA9Ffvr+w=="
|
"integrity": "sha512-4/Z9DMPKFexZj/Gn3LylFgamNKHm4K3QDi0gz9B26Uk0c8izYf97B5fxfpspMNkWlFupblKM/nV8+NA9Ffvr+w=="
|
||||||
},
|
},
|
||||||
|
"@types/prompt": {
|
||||||
|
"version": "1.1.1",
|
||||||
|
"resolved": "https://registry.npmjs.org/@types/prompt/-/prompt-1.1.1.tgz",
|
||||||
|
"integrity": "sha512-Ht3nSZy87jqKM5Y92GWKD6RQTqQIi6tAKhrWgEvFPh+P13L5olqBYs+P1HySBYRHyIezEqrB3StK4X7lBFmIEQ==",
|
||||||
|
"dev": true,
|
||||||
|
"requires": {
|
||||||
|
"@types/node": "*",
|
||||||
|
"@types/revalidator": "*"
|
||||||
|
}
|
||||||
|
},
|
||||||
"@types/request": {
|
"@types/request": {
|
||||||
"version": "2.48.6",
|
"version": "2.48.6",
|
||||||
"resolved": "https://registry.npmjs.org/@types/request/-/request-2.48.6.tgz",
|
"resolved": "https://registry.npmjs.org/@types/request/-/request-2.48.6.tgz",
|
||||||
@ -684,6 +694,22 @@
|
|||||||
"@types/request": "*"
|
"@types/request": "*"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"@types/revalidator": {
|
||||||
|
"version": "0.3.8",
|
||||||
|
"resolved": "https://registry.npmjs.org/@types/revalidator/-/revalidator-0.3.8.tgz",
|
||||||
|
"integrity": "sha512-q6KSi3PklLGQ0CesZ/XuLwly4DXXlnJuucYOG9lrBqrP8rKiuPZThav2h2+pFjaheNpnT0qKK3i304QWIePeJw==",
|
||||||
|
"dev": true
|
||||||
|
},
|
||||||
|
"@types/shelljs": {
|
||||||
|
"version": "0.8.9",
|
||||||
|
"resolved": "https://registry.npmjs.org/@types/shelljs/-/shelljs-0.8.9.tgz",
|
||||||
|
"integrity": "sha512-flVe1dvlrCyQJN/SGrnBxqHG+RzXrVKsmjD8WS/qYHpq5UPjfq7UWFBENP0ZuOl0g6OpAlL6iBoLSvKYUUmyQw==",
|
||||||
|
"dev": true,
|
||||||
|
"requires": {
|
||||||
|
"@types/glob": "*",
|
||||||
|
"@types/node": "*"
|
||||||
|
}
|
||||||
|
},
|
||||||
"@types/sinon": {
|
"@types/sinon": {
|
||||||
"version": "10.0.4",
|
"version": "10.0.4",
|
||||||
"resolved": "https://registry.npmjs.org/@types/sinon/-/sinon-10.0.4.tgz",
|
"resolved": "https://registry.npmjs.org/@types/sinon/-/sinon-10.0.4.tgz",
|
||||||
|
@ -65,7 +65,9 @@
|
|||||||
"@types/chai": "^4.2.15",
|
"@types/chai": "^4.2.15",
|
||||||
"@types/glob": "^7.1.4",
|
"@types/glob": "^7.1.4",
|
||||||
"@types/mocha": "^9.0.0",
|
"@types/mocha": "^9.0.0",
|
||||||
|
"@types/prompt": "^1.1.1",
|
||||||
"@types/request-promise": "^4.1.42",
|
"@types/request-promise": "^4.1.42",
|
||||||
|
"@types/shelljs": "^0.8.9",
|
||||||
"@types/sinon": "^10.0.0",
|
"@types/sinon": "^10.0.0",
|
||||||
"@types/unzipper": "^0.10.4",
|
"@types/unzipper": "^0.10.4",
|
||||||
"@types/webpack": "^5.0.0",
|
"@types/webpack": "^5.0.0",
|
||||||
|
Reference in New Issue
Block a user