Skip to content

Commit 6a38678

Browse files
committed
work around typedoc failing to compile
1 parent 1862783 commit 6a38678

1 file changed

Lines changed: 11 additions & 5 deletions

File tree

gulpfile.js

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1126,18 +1126,24 @@ function readFile(filePath, options) {
11261126
}));
11271127
const tsVersion = CRMPackage.devDependencies.typescript;
11281128

1129-
console.log('Changing typescript version in cloned typedoc');
1129+
console.log('Installing grunt');
1130+
await runCmd('npm install -g grunt-cli', cwd);
1131+
1132+
console.log('Removing post install hook');
11301133
const file = await readFile(path.join(__dirname, 'typedoc', 'package.json'), {
11311134
encoding: 'utf8'
11321135
});
11331136
await writeFile(path.join(__dirname, 'typedoc', 'package.json'),
1134-
file.replace(/"typescript": "\d+\.\d+\.\d+"/g, `"typescript": "${tsVersion}"`));
1135-
1136-
console.log('Installing grunt');
1137-
await runCmd('npm install -g grunt-cli', cwd);
1137+
file.replace(/"prepare":/g, "\"ignored\":"));
11381138

11391139
console.log('Installing typedoc dependencies (this may take a few minutes)');
11401140
await runCmd('npm install', cwd);
1141+
1142+
console.log('Running post install hook');
1143+
await runCmd('grunt default --force', cwd);
1144+
1145+
console.log('Installing this extension\'s typescript version in cloned typedoc');
1146+
await runCmd(`npm install --save typescript@${tsVersion}`, cwd);
11411147

11421148
console.log('Done!');
11431149
}

0 commit comments

Comments
 (0)