prompt-path
v1.0.1
Published
Get the file system path in CLI app
Downloads
2
Readme
prompt-path
When you need to prompt a path in your CLI app.
Usage
const { promptPath } = require("prompt-path");
promptPath().then((path) => {
console.log(path);
});
Params (optional)
const path = await promptPath({
basePath: "~",
prefix: "file: ",
target: PromptPathTarget.File,
});
- basePath Initial path (current directory by default).
- prefix The prompt string to use (
'> '
by default). - target File or directory (both by default).