Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

inquirer-directory

Package Overview
Dependencies
Maintainers
1
Versions
9
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

inquirer-directory

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

  • 1.1.1
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
32K
decreased by-23.5%
Maintainers
1
Weekly downloads
 
Created
Source

inquirer-directory

Relative Directory prompt for inquirer

Build Status

Installation

npm install --save inquirer-directory

Usage

This prompt is anonymous, meaning you can register this prompt with the type name you please:

inquirer.registerPrompt('directory', require('inquirer-directory'));
inquirer.prompt({
  type: 'directory',
  ...
})

Change directory to whatever you might prefer.

Options

Takes type, name, message, basePath properties.

See inquirer readme for meaning of all except basePath.

basePath is the relative path from your current working directory

Example
inquirer.registerPrompt('directory', require('inquirer-directory'));
inquirer.prompt([{
  type: 'directory',
  name: 'from',
  message: 'Where you like to put this component?',
  basePath: './src'
}], function(answers) {
  //etc
});

Demo

See also example.js for a working example

License

MIT

Keywords

FAQs

Package last updated on 11 Dec 2015

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc