Skip to content

Commit 877ef24

Browse files
committed
redo commit 4528c2
1 parent 2eb64d1 commit 877ef24

1 file changed

Lines changed: 17 additions & 15 deletions

File tree

gulpfile.js

Lines changed: 17 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1029,21 +1029,23 @@ function readFile(filePath, options) {
10291029
});
10301030
}
10311031

1032-
async function runCmd(cmd, cwd = __dirname) {
1033-
return new Promise((resolve, reject) => {
1034-
// @ts-ignore
1035-
const proc = childProcess.exec(cmd, {
1036-
cwd: cwd
1037-
// @ts-ignore
1038-
}, (err, stdout, stderr) => {
1039-
if (err !== null) {
1040-
reject(err);
1041-
} else {
1042-
resolve();
1043-
}
1032+
async function runCmd(cmd, cwd = __dirname,
1033+
allowFailure = false) {
1034+
return new Promise((resolve, reject) => {
1035+
// @ts-ignore
1036+
const proc = childProcess.exec(cmd, {
1037+
cwd: cwd
1038+
// @ts-ignore
1039+
}, (err, stdout, stderr) => {
1040+
if (err !== null && !allowFailure) {
1041+
console.log(stdout, stderr);
1042+
reject(err);
1043+
} else {
1044+
resolve();
1045+
}
1046+
});
10441047
});
1045-
});
1046-
}
1048+
}
10471049

10481050
// @ts-ignore
10491051
function promisePipe(pipe) {
@@ -1082,7 +1084,7 @@ function readFile(filePath, options) {
10821084
await runCmd('npm install', cwd);
10831085

10841086
console.log('Running post install hook');
1085-
await runCmd('grunt default --force', cwd);
1087+
await runCmd('tsc --project .', cwd, true);
10861088

10871089
console.log('Installing this extension\'s typescript version in cloned typedoc');
10881090
await runCmd(`npm install --save typescript@${tsVersion}`, cwd);

0 commit comments

Comments
 (0)