1.0.0 • Published 3 years ago
inquirer-glob-prompt v1.0.0
inquirer-glob-prompt
Glob prompt for inquirer. Prompts for a glob and lists matching files as you type.
Installation
$ npm install --save inquirer-glob-promptUsage
import inquirer from 'inquirer';
import GlobPrompt from 'inquirer-glob-prompt';
// you can change 'glob' to any prefered type name
inquirer.registerPrompt('glob', GlobPrompt);
let answers = await inquirer.prompt([{
type: 'glob',
name: 'filePaths'
// ...
}]);
console.log(answers);Options
Takes type, name, message, default, when, pageSize, glob properties. See
inquirer documentation for properties other than glob.
glob (Object) options are passed directly to fast-glob during initial render and whenever input changes.
Example
Run the example:
$ node example.js