Skip to content

How to set Git initialization and package manager selection through command line arguments? #226

@TomasHubelbauer

Description

@TomasHubelbauer

Hi, I am interested in invoking the Yeoman generator-code from the command line and passing the various options through command line arguments. I was able to make this work by using yo code --help and seeing the argument names of the first few questions, but I don't see what to use for the gitInit and pkgManager options. I found these in https://github.com/microsoft/vscode-generator-code/blob/master/generators/app/prompts.js so I know their names, but they are not in yo code --help. Additionally, I'm not sure these two work, because I tried several ways of answering with a no to the Git init question and none worked:

  • --gitInit n
  • --gitInit no
  • --gitInit false
  • --no-gitInit
  • --nogitInit

None of these worked, every time I run yo code ... --gitInit something I still get the Git question asked to me. How can I finish this command line up and set Git initialization to false and pick NPM as the package manager?

Metadata

Metadata

Assignees

Labels

feature-requestRequest for new features or functionalityverification-neededVerification of issue is requested

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions