yeoman / yo

CLI tool for running Yeoman generators
http://yeoman.io
BSD 2-Clause "Simplified" License
3.85k stars 399 forks source link

yo --help does not list subgenerators. #280

Closed dnozay closed 9 years ago

dnozay commented 9 years ago

I'm trying to find that particular command that I always mis-type. But the help is of no help.

(jk)Damiens-MacBook-Air:foo damien$ yo --generators
angular
jekyllrb
karma
mocha
(jk)Damiens-MacBook-Air:foo damien$ yo angular --help
Usage:
  yo angular:app [options] [<appname>]

Options:
  -h,   --help                # Print generator's options and usage                   Default: false
        --app-suffix          # Allow a custom suffix to be added to the module name  Default: false
        --appPath             # Generate CoffeeScript instead of JavaScript           Default: false
        --coffee              # Generate CoffeeScript instead of JavaScript           Default: false
        --angular:common      # Angular:common to be invoked                          Default:
        --angular:main        # Angular:main to be invoked                            Default:
        --angular:controller  # Angular:controller to be invoked                      Default:

Arguments:
  appname  # Type: String  Required: false
SBoudrias commented 9 years ago

Just type yo --help. yo generator --help provide help for that specific generator.

What would you like more as help information?

dnozay commented 9 years ago

the list of subgenerators for generators that are installed.

dnozay commented 9 years ago

in this code:

exports.generatorsFromEnv = function (env) {
  return arrayUniq(Object.keys(env.getGeneratorsMeta()).map(exports.namespaceToName));
};

you already have all the generators, but then you shrink down the list to the namespaces instead of generators.

sindresorhus commented 9 years ago

yo --generators is meant for programmatic consumption and only contains the top level ones. I've made yo --help output subgenerators too.

JuliusKoronci commented 5 years ago

This actually doesn't work..I have 10 folders in the generators dir but only the app is listed when running yo mygenerator --help