jhipster / generator-jhipster

JHipster is a development platform to quickly generate, develop, & deploy modern web applications & microservice architectures.
https://www.jhipster.tech
Apache License 2.0
21.48k stars 4.02k forks source link

Add all options to skip some prompts of app generator questions #10482

Closed ghost closed 4 years ago

ghost commented 5 years ago

Overview of the feature request Hi all wonderful community, I suggest to support option to skip the questions that we can't override. For some questions jhipster already provides it (skip-server, skip-client and so on), but for the i18n there is the parameter without cli settings this.skipI18n.

So we have to provide skipping for:

After in every blueprint the developer can add for default that options.

Motivation for or Use Case Refers to this comment and #9692 issue. As is difficult to override or extend the app generator class, is useful to not display the app generator questions that we don't want into the blueprint. Then it's easy to custom the other rest of prompts in every subgenerator to have the full control of blueprint.

Related issues or PR The nodejs blueprint issue requires it for the question about additional test framework .

Kerruba commented 5 years ago

I think also supporting skipping questions by providing a default answer would be fantastic for the #9692 issue. As a blueprint developer for example I would like to make the assumption in the blueprint that the app is always a microservice

ghost commented 5 years ago

I think also supporting skipping questions by providing a default answer would be fantastic for the #9692 issue. As a blueprint developer for example I would like to make the assumption in the blueprint that the app is always a microservice

Hi @Kerruba, you can already set a your value in the blueprint generator.. You can change any response from the server (or other) subgenerator initialization phase (in your case for the application type read this)

Otherwise, you can add a check to force the user selecting an exact answer.

Instead, if you want that it doesn't prompt the application type and the app name, we can add a skip also for these and use the default already set by the app generator ( and that you can override in blueprint as I have said). Do you all agree?

ghost commented 5 years ago

Hi @Kerruba, For your happiness in my PR I have also add a --skip-app-type option. The default value for the application type, set by jhipster, is monolith, but you can change it in your server initialization phase. Thanks

pascalgrimaud commented 4 years ago

I'm closing this as https://github.com/jhipster/generator-jhipster/pull/10752 has been merged and it should help