jumpUp.js 462 B

12345678910111213141516171819
  1. const inquirer = require('inquirer')
  2. const inquirerFileTreeSelection = require('../dist/index')
  3. const path = require('path');
  4. const chalk = require('chalk');
  5. inquirer.registerPrompt('file-tree-selection', inquirerFileTreeSelection)
  6. inquirer
  7. .prompt([
  8. {
  9. type: 'file-tree-selection',
  10. name: 'file',
  11. message: 'choose a file',
  12. enableGoUpperDirectory: true
  13. },
  14. ])
  15. .then(answers => {
  16. console.log(JSON.stringify(answers))
  17. });