From 317c43b75be027f971c1c7e28890fdd37b63e931 Mon Sep 17 00:00:00 2001 From: Yamagishi Kazutoshi Date: Fri, 15 Mar 2019 11:53:38 +0900 Subject: Upgrade yargs to v12.0 (#9862) --- config/webpack/translationRunner.js | 22 ++++++++++------------ 1 file changed, 10 insertions(+), 12 deletions(-) (limited to 'config/webpack') diff --git a/config/webpack/translationRunner.js b/config/webpack/translationRunner.js index e6543fbb7..38050baf8 100644 --- a/config/webpack/translationRunner.js +++ b/config/webpack/translationRunner.js @@ -48,8 +48,7 @@ Use yarn "manage:translations -- --help" for usage information } }; -const { argv } = require('yargs') - .usage(`Usage: yarn manage:translations -- [OPTIONS] [LANGUAGES] +const usage = `Usage: yarn manage:translations [OPTIONS] [LANGUAGES] Manage JavaScript translation files in Mastodon. Generates and update translations in translationsDirectory: ${translationsDirectory} @@ -58,16 +57,15 @@ The RFC5646 language tag for the language you want to test or fix. If you want t Available languages: ${availableLanguages.join(', ')} -`) - .help('h', 'show this message') - .alias('h', 'help') - .options({ - f: { - alias: 'force', - default: false, - describe: 'force using the provided languages. create files if not exists.', - type: 'boolean', - }, +`; + +const { argv } = require('yargs') + .usage(usage) + .option('f', { + alias: 'force', + default: false, + describe: 'force using the provided languages. create files if not exists.', + type: 'boolean', }); // check if message directory exists -- cgit