ember-watson icon indicating copy to clipboard operation
ember-watson copied to clipboard

Shows the help if the command is wrong or empty

Open SamvelRaja opened this issue 9 years ago • 3 comments

This PR will show up the Help generated by commander when ever an non-supported command has been triggered( Mosted cases it happens for me because of typo.)

And also times when there is no command provided.

Say,

$ember-watson non-supported-command

The command is not supported, Use the below supported commands

  Usage: ember-watson [options] [command] <cmd>


  Commands:

    upgrade-qunit-tests [testsPath]                         Fix QUnit tests to match 2.0 syntax. testsPath defaults to tests/
    convert-prototype-extensions [appPath]                  Convert computed properties and observers to not use prototype extensions. appPath defaults to app/
    convert-ember-data-model-lookups [appPath]              convert Ember Data model lookups to use a dasherized string
    convert-ember-data-async-false-relationships [appPath]  convert Ember Data relationship with implicit async: false to explicit option
    convert-resource-router-mapping [routerPath]            convert the resource router mapping to use the route mapping with the new resetNamespace option
    methodify [path]                                        Convert methods to new ES6 syntax
    find-overloaded-cps [options] [path]                    This lists all the places that will trigger the "Using the same function as getter and setter" deprecation.

  Options:

    -h, --help     output usage information
    -V, --version  output the version number

and for just ember-watson

$ember-watson

Usage: ember-watson [options] [command] <cmd>


  Commands:

    upgrade-qunit-tests [testsPath]                         Fix QUnit tests to match 2.0 syntax. testsPath defaults to tests/
    convert-prototype-extensions [appPath]                  Convert computed properties and observers to not use prototype extensions. appPath defaults to app/
    convert-ember-data-model-lookups [appPath]              convert Ember Data model lookups to use a dasherized string
    convert-ember-data-async-false-relationships [appPath]  convert Ember Data relationship with implicit async: false to explicit option
    convert-resource-router-mapping [routerPath]            convert the resource router mapping to use the route mapping with the new resetNamespace option
    methodify [path]                                        Convert methods to new ES6 syntax
    find-overloaded-cps [options] [path]                    This lists all the places that will trigger the "Using the same function as getter and setter" deprecation.

  Options:

    -h, --help     output usage information
    -V, --version  output the version number

Feel free to add add suggestions or reject this PR if not needed.

SamvelRaja avatar Sep 08 '15 15:09 SamvelRaja

Any plan for merging this ??

SamvelRaja avatar Sep 26 '15 06:09 SamvelRaja

@SamvelRaja can you please rebase and I'll merge it after that :)

abuiles avatar Dec 09 '16 13:12 abuiles

Ping

knownasilya avatar Jun 27 '17 01:06 knownasilya