inquirer-glob-prompt

1.0.0 • Public • Published

inquirer-glob-prompt

Glob prompt for inquirer. Prompts for a glob and lists matching files as you type.

Installation

$ npm install --save inquirer-glob-prompt

Usage

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

License

MIT

/inquirer-glob-prompt/

    Package Sidebar

    Install

    npm i inquirer-glob-prompt

    Weekly Downloads

    151

    Version

    1.0.0

    License

    MIT

    Unpacked Size

    6.75 kB

    Total Files

    4

    Last publish

    Collaborators

    • wwilsman