Pre-render ReDoc

redoc-cliはexpandResponsesは200のみとすると数値と認識されてしまい設定できないため202,204という指定にしています
This commit is contained in:
tamaina 2020-04-03 17:13:41 +09:00
parent 9e9d378bf1
commit 795fb0eb60
11 changed files with 885 additions and 112 deletions

View file

@ -4,11 +4,15 @@ async function main(uri: string): Promise<any> {
return await updateQuestion(uri);
}
const args = process.argv.slice(2);
const uri = args[0];
main(uri).then(result => {
console.log(`Done: ${result}`);
}).catch(e => {
console.warn(e);
});
export default () => {
const args = process.argv.slice(3);
const uri = args[0];
main(uri).then(result => {
console.log(`Done: ${result}`);
process.exit(0);
}).catch(e => {
console.warn(e);
process.exit(1);
});
}