feat(cli): add the --title option to the serve subcommand (#1160)

This commit is contained in:
Zakary Kamal Ismail 2020-05-09 07:31:54 -04:00 committed by GitHub
parent 1c7fc1a261
commit 10414fc6d5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -50,6 +50,11 @@ YargsParser.command(
describe: 'path or URL to your spec',
});
yargs.options('title', {
describe: 'Page Title',
type: 'string',
});
yargs.option('s', {
alias: 'ssr',
describe: 'Enable server-side rendering',
@ -73,6 +78,7 @@ YargsParser.command(
async argv => {
const config: Options = {
ssr: argv.ssr as boolean,
title: argv.title as string,
watch: argv.watch as boolean,
templateFileName: argv.template as string,
templateOptions: argv.templateOptions || {},