
Security News
npm ‘is’ Package Hijacked in Expanding Supply Chain Attack
The ongoing npm phishing campaign escalates as attackers hijack the popular 'is' package, embedding malware in multiple versions.
inquirer-file-path
Advanced tools
Relative File Path prompt for inquirer
npm install --save inquirer-file-path
/
key/
key to enter search mode.up
/down
arrow keys or k
/j
to navigateenter
to select optionThis prompt is anonymous, meaning you can register this prompt with the type name you please:
inquirer.registerPrompt('filePath', require('inquirer-file-path'));
inquirer.prompt({
type: 'filePath',
...
})
Change filePath
to whatever you might prefer.
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
inquirer.registerPrompt('filePath', require('inquirer-file-path'));
inquirer.prompt([{
type: 'file',
name: 'from',
message: 'Where you like to put this component?',
basePath: './src'
}]).then(function(answers) {
// (answers.from is the path chosen)
});
See also example.js for a working example
Unit test
Unit test are written in Mocha. Please add a unit test for every new feature or bug fix. npm test
to run the test suite.
Documentation Add documentation for every API change. Feel free to send typo fixes and better docs!
MIT
A huge thank you to Nick Randall and the other contributors of https://github.com/nicksrandall/inquirer-directory.
FAQs
a file (relative to given path) selector for Inquirer.js
The npm package inquirer-file-path receives a total of 3,555 weekly downloads. As such, inquirer-file-path popularity was classified as popular.
We found that inquirer-file-path demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
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.
Security News
The ongoing npm phishing campaign escalates as attackers hijack the popular 'is' package, embedding malware in multiple versions.
Security News
A critical flaw in the popular npm form-data package could allow HTTP parameter pollution, affecting millions of projects until patched versions are adopted.
Security News
Bun 1.2.19 introduces isolated installs for smoother monorepo workflows, along with performance boosts, new tooling, and key compatibility fixes.