Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ng help generate does not list existing blueprints (beta24) #3699

Closed
denofevil opened this issue Dec 22, 2016 · 5 comments · Fixed by #4267
Closed

ng help generate does not list existing blueprints (beta24) #3699

denofevil opened this issue Dec 22, 2016 · 5 comments · Fixed by #4267
Assignees
Labels
P3 An issue that is relevant to core functions, but does not impede progress. Important, but not urgent type: bug/fix

Comments

@denofevil
Copy link

Please provide us with the following information:

OS?

Windows 7, 8 or 10. Linux (which distribution). Mac OSX (Yosemite? El Capitan?)

macOS Sierra

Versions.

Please run ng --version. If there's nothing outputted, please run in a Terminal: node --version and paste the result here:

angular-cli: 1.0.0-beta.24
node: 7.2.1
os: darwin x64

Repro steps.

Was this an app that wasn't created using the CLI? What change did you do on your code? etc.

Run ng help generate in an new app generated by CLI

The log given by the failure.

Normally this include a stack trace and some more information.
I'm getting only this

ng help generate
ember generate <blueprint> <options...>
  Generates new code from blueprints.
  aliases: g
  --dry-run (Boolean) (Default: false)
    aliases: -d
  --verbose (Boolean) (Default: false)
    aliases: -v
  --pod (Boolean) (Default: false)
    aliases: -p
  --classic (Boolean) (Default: false)
    aliases: -c
  --dummy (Boolean) (Default: false)
    aliases: -dum, -id
  --in-repo-addon (String) (Default: null)
    aliases: --in-repo <value>, -ir <value>

Mention any other details that might be useful.

beta20 output was like this

  Available blueprints:
    angular-cli:
      class <name> <options...>
        --spec (Boolean)
      component <name> <options...>
        --flat (Boolean) (Default: false)
        --inline-template (Boolean)
          aliases: -it
        --inline-style (Boolean)
          aliases: -is
        --prefix (Boolean) (Default: true)
        --spec (Boolean)
      component-test <name>
      directive <name> <options...>
        --flat (Boolean) (Default: true)
        --prefix (Boolean) (Default: true)
        --spec (Boolean)
      enum <name>
      interface <interface-type>
      mobile <name> <options...>
        --source-dir (String) (Default: src)
          aliases: -sd <value>
        --prefix (String) (Default: app)
          aliases: -p <value>
        --mobile (Boolean) (Default: false)
      model <name> <attr:type>
        Generates an ng-data model.
      module <name> <options...>
        --spec (Boolean)
        --routing (Boolean) (Default: false)
      ng2 <name> <options...>
        --source-dir (String) (Default: src)
          aliases: -sd <value>
        --prefix (String) (Default: app)
          aliases: -p <value>
        --style (String) (Default: css)
        --mobile (Boolean) (Default: false)
        --routing (Boolean) (Default: false)
        --inline-style (Boolean) (Default: false)
          aliases: -is
        --inline-template (Boolean) (Default: false)
          aliases: -it
      pipe <name> <options...>
        --flat (Boolean) (Default: true)
        --spec (Boolean)
      route <name>
      route-test <name>
      service <name> <options...>
        --flat (Boolean) (Default: true)
        --spec (Boolean)
      service-test <name>
    angular-cli:
      acceptance-test <name>
        Generates an acceptance test for a feature.
      adapter <name> <options...>
        Generates an ng-data adapter.
        --base-class (String)
      adapter-test <name>
        Generates an ng-data adapter unit test
      addon <name>
        The default blueprint for angular-cli addons.
      addon-import <name>
        Generates an import wrapper.
      app <name>
        The default blueprint for angular-cli projects.
      blueprint <name>
        Generates a blueprint and definition.
      component-addon <name>
        Generates a component. Name must contain a hyphen.
      controller <name>
        Generates a controller.
      controller-test <name>
        Generates a controller unit test.
      helper <name>
        Generates a helper function.
      helper-addon <name>
        Generates an import wrapper.
      helper-test <name>
        Generates a helper unit test.
      http-mock <endpoint-path>
        Generates a mock api endpoint in /api prefix.
      http-proxy <local-path> <remote-url>
        Generates a relative proxy to another server.
      in-repo-addon <name>
        The blueprint for addon in repo angular-cli addons.
      initializer <name>
        Generates an initializer.
      initializer-addon <name>
        Generates an import wrapper.
      initializer-test <name>
        Generates an initializer unit test.
      instance-initializer <name>
        Generates an instance initializer.
      instance-initializer-addon <name>
        Generates an import wrapper.
      instance-initializer-test <name>
        Generates an instance initializer unit test.
      lib <name>
        Generates a lib directory for in-repo addons.
      mixin <name>
        Generates a mixin.
      mixin-test <name>
        Generates a mixin unit test.
      model-test <name>
        Generates a model unit test.
      resource <name>
        Generates a model, template, route, and registers the route with the router.
      route-addon <name>
        Generates import wrappers for a route and its template.
      serializer <name>
        Generates an ng-data serializer.
      serializer-test <name>
        Generates a serializer unit test.
      server <name>
        Generates a server directory for mocks and proxies.
      template <name>
        Generates a template.
      test-helper <name>
        Generates a test helper.
      transform <name>
        Generates an ng-data value transform.
      transform-test <name>
        Generates a transform unit test.
      util <name>
        Generates a simple utility module/function.
      util-test <name>
        Generates a util unit test.
      vendor-shim <name>
        Generates an ES6 module shim for global libraries.

#3697 looks related


Thanks! We'll be in touch soon.

@denofevil denofevil changed the title ng help generate does not list existing blueprints ng help generate does not list existing blueprints (beta24) Dec 22, 2016
@filipesilva filipesilva added P3 An issue that is relevant to core functions, but does not impede progress. Important, but not urgent type: bug/fix labels Dec 30, 2016
@filipesilva
Copy link
Contributor

@Brocco can you weight in?

@pcafstockf
Copy link

FYI, this functionality maters, because it allows front end tools and IDE to understand what each version of ng is able to generate.

@catull
Copy link
Contributor

catull commented Jan 27, 2017

Why is the line 59 in help.ts not changed to

          this.ui.writeLine(command.printDetailedHelp(commandOptions));

This change gives with ng help

ng generate <blueprint> <options...>
  Generates new code from blueprints.
  aliases: g
  --dry-run (Boolean) (Default: false)
    aliases: -d
  --verbose (Boolean) (Default: false)
    aliases: -v
  --pod (Boolean) (Default: false)
    aliases: -p
  --classic (Boolean) (Default: false)
    aliases: -c
  --dummy (Boolean) (Default: false)
    aliases: -dum, -id
  --in-repo-addon (String) (Default: null)
    aliases: --in-repo <value>, -ir <value>

and with ng help generate the desired output:

  Available blueprints:
    angular-cli:
      class <name> <options...>
        --spec (Boolean)
      component <name> <options...>
        --flat (Boolean) (Default: false)
        --inline-template (Boolean)
          aliases: -it
        --inline-style (Boolean)
          aliases: -is
        --prefix (String) (Default: null)
        --spec (Boolean)
        --view-encapsulation (String)
          aliases: -ve <value>
        --change-detection (String)
          aliases: -cd <value>
        --skip-import (Boolean) (Default: false)
        --module (String)
          aliases: -m <value>
        --export (Boolean) (Default: false)
      directive <name> <options...>
        --flat (Boolean) (Default: true)
        --prefix (String) (Default: null)
        --spec (Boolean)
        --skip-import (Boolean) (Default: false)
        --module (String)
          aliases: -m <value>
        --export (Boolean) (Default: false)
      enum <name>
      interface <interface-type>
      module <name> <options...>
        --spec (Boolean)
        --routing (Boolean) (Default: false)
      ng2 <name> <options...>
        --source-dir (String) (Default: src)
          aliases: -sd <value>
        --prefix (String) (Default: app)
          aliases: -p <value>
        --style (String) (Default: css)
        --routing (Boolean) (Default: false)
        --inline-style (Boolean) (Default: false)
          aliases: -is
        --inline-template (Boolean) (Default: false)
          aliases: -it
        --skip-git (Boolean) (Default: false)
          aliases: -sg
      pipe <name> <options...>
        --flat (Boolean) (Default: true)
        --spec (Boolean)
        --skip-import (Boolean) (Default: false)
        --module (String)
          aliases: -m <value>
        --export (Boolean) (Default: false)
      service <name> <options...>
        --flat (Boolean) (Default: true)
        --spec (Boolean)
        --module (String)
          aliases: -m <value>

@Brocco
Copy link
Contributor

Brocco commented Jan 28, 2017

@catull That looks great... please go ahead and put a PR together with that change.

@angular-automatic-lock-bot
Copy link

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Sep 6, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
P3 An issue that is relevant to core functions, but does not impede progress. Important, but not urgent type: bug/fix
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants