inquirer-repo-exists
Helpe
Helper function using inquirer to validate whether a URL (or a username/repo pair) provided in a prompt refers to an existing GitHub repository URL
If the provided URL (or a username/repo pair) doesn't refer to an existing GitHub repository, then the users will be prompted and asked if they want to choose another one. If so, we'll recurse through the same validation process until we have a valid GitHub repository link.
Install
$ npm install --save inquirer-repo-exist
Usage
var inquirer = ;var repoExists = ; ;
Inside a Yeoman Generator you'd call it this way:
var generators = ;var inquirer = ;var askName = ; moduleexports = generatorsBase;
repoUrl
takes 3 parameters:
prompt
an Inquirer prompt configuration.inquirer
or any object with aobj.prompt()
method.- The
callback
who'll take the selected name as parameter.
License
MIT © Philipp Alferov