2.3.0 • Published 5 years ago

inquirer-fuzzy-path v2.3.0

Weekly downloads
51,104
License
MIT
Repository
-
Last release
5 years ago

inquirer-fuzzy-path

npm npm

Fuzzy file/directory search and select prompt for Inquirer.js

inquirer-fuzzy-path demo

Usage

Register the prompt with inquirer:

inquirer.registerPrompt('fuzzypath', require('inquirer-fuzzy-path'))

Call the prompt:

  return inquirer.prompt([
    {
      type: 'fuzzypath',
      name: 'path',
      excludePath: nodePath => nodePath.startsWith('node_modules'),
        // excludePath :: (String) -> Bool
        // excludePath to exclude some paths from the file-system scan
      excludeFilter: nodePath => nodePath == '.',
        // excludeFilter :: (String) -> Bool
        // excludeFilter to exclude some paths from the final list, e.g. '.'
      itemType: 'any',
        // itemType :: 'any' | 'directory' | 'file'
        // specify the type of nodes to display
        // default value: 'any'
        // example: itemType: 'file' - hides directories from the item list
      rootPath: 'app',
        // rootPath :: String
        // Root search directory
      message: 'Select a target directory for your component:',
      default: 'components/',
      suggestOnly: false,
        // suggestOnly :: Bool
        // Restrict prompt answer to available choices or use them as suggestions
      depthLimit: 5,
        // depthLimit :: integer >= 0
        // Limit the depth of sub-folders to scan
        // Defaults to infinite depth if undefined
    }
  ]);

Change log

  • In version 2.2.0 new option excludeFilter was added.
  • In version 2.1.0 new option depthLimit was added.
  • In version 2.0.0 option filterPath was deprecated. Please use excludePath and itemType instead.

Related

  • inquirer - A collection of common interactive command line user interfaces

License

MIT © adelsz

bit-bin@kimonocloud/kimono-manifest-generator@greendjango/blih_cli@gulppress/cliredux-saga-crud-generatorredux-saga-generatorredux-saga-crud-cliarintra@crisp-dynamics/clielement-orders-tools@infinitebrahmanuniverse/nolb-inq@digitalcopilote/storybook@everything-registry/sub-chunk-1916idangibly-clitankvusionxlsx-to-csv-clitemp-temp-temptemplate-library-clitemplates-for-reactsvelte-component-generatorvoyager-verifyvoyager-verify-test@crescendo-collective/carmen@comradesharf/plop-generator-mindset-custom@cuginoale/paxe@dekproject/cli@booms/cli-page@ruijingrs/swagger-exporterjudge-toolkitjudgekitlb-test-toolslcaplcap-mincli-xrmarsenal@raipiot-infra/rpxsrctagstarkopsstarkscantuatuaxts-domainertranslate-field-to-sanitytrello-json-to-cardstrecli@aigrefin/nemo@aragon/cli@aragon/osx-cli@anejs/anne-cli@anonklub/cli@astar-network/swanky-cli@atomic-reactor/cli@avdw/serv@autometa/testrail-cucumber@algotia/cli@alantech/react-cli@alexisab/migrate@bibletags/bibletags-data@busy-human/configurator@chancetop/cli-page@ablestar/ablestar-cli@dbenfouzari/cli@dbenfouzari/cli-tools@deviljin112/slsm@datorama/akita-clizap-termxxvoyager-verifyxxtestvoyager-verifyxrmarsenal-cliwbup-cli@fcv/hygen-react@hastics/cli@hulujs/core@fleekhq/fleek-cli@genesislcap/foundation-cli@mango-scripts/utils@msz-cli/utils@mustang/cli@master4n/master-cli@netherium/api-gen@ngneat/lit-file-generator@ngneat/elf-cli@microting/schematics-core@mkfe/tinypng@jinyexin/corecli@jkikksa/generate@josee9988/implode-css@kimonocloud/manifest-generator@juaji/scalars-cli@hyron/cli@radic/hosting@radic/sites@sassoftware/afcli@scalars/cli@schuchard/schematics-core@openfn/devtools@open-age/cli@onr/cli@noveo/scaffolding@npmtmp/schematics-core
2.3.0

5 years ago

2.2.1

5 years ago

2.2.0

6 years ago

2.1.0

6 years ago

2.0.3

6 years ago

2.0.2

6 years ago

2.0.1

6 years ago

2.0.0

6 years ago

1.0.0

7 years ago