UNPKG

inquirer-file-path

Version:

a file (relative to given path) selector for Inquirer.js

19 lines (16 loc) 393 B
/** * File path prompt example */ "use strict"; var inquirer = require("inquirer"); inquirer.registerPrompt('filePath', require('./index')); inquirer.prompt([ { type: "filePath", name: "path", message: "What file would you like to perform this action on?", basePath: "./node_modules" } ], function( answers ) { console.log( JSON.stringify(answers, null, " ") ); });