From da1e1a39b1315da1dccea8303bfaac898255d9f7 Mon Sep 17 00:00:00 2001 From: tim Date: Sun, 20 Aug 2017 09:37:03 +0200 Subject: [PATCH] Upgrade: Update yargs dependency (closes #127) --- index.js | 2 +- package.json | 2 +- test/expected/flags-help.txt | 48 +++++++++++++++++++++++------------- 3 files changed, 33 insertions(+), 19 deletions(-) diff --git a/index.js b/index.js index 87ef29e9..b5e13998 100644 --- a/index.js +++ b/index.js @@ -107,7 +107,7 @@ function handleArguments(env) { toConsole(log, opts); if (opts.help) { - console.log(parser.help()); + parser.showHelp(console.log); exit(0); } diff --git a/package.json b/package.json index cca89e09..ea5861f1 100644 --- a/package.json +++ b/package.json @@ -48,7 +48,7 @@ "tildify": "^1.0.0", "v8flags": "^2.0.9", "wreck": "^6.3.0", - "yargs": "^3.28.0" + "yargs": "^7.1.0" }, "devDependencies": { "babel-preset-es2015": "^6.5.0", diff --git a/test/expected/flags-help.txt b/test/expected/flags-help.txt index b6ef2633..cb74d1fd 100644 --- a/test/expected/flags-help.txt +++ b/test/expected/flags-help.txt @@ -2,21 +2,35 @@ Usage: gulp [options] tasks Options: - --help, -h Show this help. [boolean] - --version, -v Print the global and local gulp versions. [boolean] - --require Will require a module before running the gulpfile. This is useful for transpilers but also has other applications. [string] - --gulpfile, -f Manually set path of gulpfile. Useful if you have multiple gulpfiles. This will set the CWD to the gulpfile directory as well. [string] - --cwd Manually set the CWD. The search for the gulpfile, as well as the relativity of all requires will be from here. [string] - --verify Will verify plugins referenced in project's package.json against the plugins blacklist. - --tasks, -T Print the task dependency tree for the loaded gulpfile. [boolean] - --tasks-simple Print a plaintext list of tasks for the loaded gulpfile. [boolean] - --tasks-json Print the task dependency tree, in JSON format, for the loaded gulpfile. - --tasks-depth, --depth Specify the depth of the task dependency tree. - --compact-tasks Reduce the output of task dependency tree by printing only top tasks and their child tasks. [boolean] - --sort-tasks Will sort top tasks of task dependency tree. [boolean] - --color Will force gulp and gulp plugins to display colors, even when no color support is detected. [boolean] - --no-color Will force gulp and gulp plugins to not display colors, even when color support is detected. [boolean] - --silent, -S Suppress all gulp logging. [boolean] - --continue Continue execution of tasks upon failure. [boolean] - --log-level, -L Set the loglevel. -L for least verbose and -LLLL for most verbose. -LLL is default. [count] + --help, -h Show this help. [boolean] + --version, -v Print the global and local gulp versions. [boolean] + --require Will require a module before running the gulpfile. + This is useful for transpilers but also has other + applications. [string] + --gulpfile, -f Manually set path of gulpfile. Useful if you have + multiple gulpfiles. This will set the CWD to the + gulpfile directory as well. [string] + --cwd Manually set the CWD. The search for the gulpfile, as + well as the relativity of all requires will be from + here. [string] + --verify Will verify plugins referenced in project's + package.json against the plugins blacklist. + --tasks, -T Print the task dependency tree for the loaded + gulpfile. [boolean] + --tasks-simple Print a plaintext list of tasks for the loaded + gulpfile. [boolean] + --tasks-json Print the task dependency tree, in JSON format, for + the loaded gulpfile. + --tasks-depth, --depth Specify the depth of the task dependency tree.[number] + --compact-tasks Reduce the output of task dependency tree by printing + only top tasks and their child tasks. [boolean] + --sort-tasks Will sort top tasks of task dependency tree. [boolean] + --color Will force gulp and gulp plugins to display colors, + even when no color support is detected. [boolean] + --no-color Will force gulp and gulp plugins to not display + colors, even when color support is detected. [boolean] + --silent, -S Suppress all gulp logging. [boolean] + --continue Continue execution of tasks upon failure. [boolean] + --log-level, -L Set the loglevel. -L for least verbose and -LLLL for + most verbose. -LLL is default. [count]