diff --git a/packages/cli/commands/preview.js b/packages/cli/commands/preview.js index ca35a1e4c..57c06d376 100644 --- a/packages/cli/commands/preview.js +++ b/packages/cli/commands/preview.js @@ -36,7 +36,7 @@ exports.command = 'preview '; exports.describe = i18n(`${i18nKey}.describe`); exports.handler = async options => { - const { src, dest, notify, initialUpload, noSsl } = options; + const { src, dest, notify, initialUpload, noSsl, port } = options; const accountId = getAccountId(options); const absoluteSrc = path.resolve(getCwd(), src); @@ -52,6 +52,7 @@ exports.handler = async options => { filePaths, initialUpload, noSsl, + port, }); }; @@ -79,5 +80,9 @@ exports.builder = yargs => { describe: i18n(`${i18nKey}.options.noSsl.describe`), type: 'boolean', }); + yargs.option('port', { + describe: i18n(`${i18nKey}.options.port.describe`), + type: 'number', + }); return yargs; }; diff --git a/packages/cli/lang/en.lyaml b/packages/cli/lang/en.lyaml index 62fc9a595..a18a3cdef 100644 --- a/packages/cli/lang/en.lyaml +++ b/packages/cli/lang/en.lyaml @@ -853,6 +853,8 @@ en: describe: "Upload directory before watching for updates" noSsl: describe: "Disable HTTPS" + port: + describe: "The port on which to start the local server" convertFields: describe: "Converts a specific JavaScript fields file of a module or theme to JSON" positionals: