Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/paveldymkov/prompt-path
https://github.com/paveldymkov/prompt-path
Last synced: about 1 month ago
JSON representation
- Host: GitHub
- URL: https://github.com/paveldymkov/prompt-path
- Owner: PavelDymkov
- License: isc
- Created: 2021-11-20T14:32:53.000Z (about 3 years ago)
- Default Branch: main
- Last Pushed: 2021-11-20T14:52:00.000Z (about 3 years ago)
- Last Synced: 2024-04-29T17:22:15.854Z (9 months ago)
- Language: TypeScript
- Size: 12.7 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# prompt-path
![build: passing](https://raw.githubusercontent.com//master/badges/build.svg)
![test: 1.0.0](https://raw.githubusercontent.com//master/badges/test.svg)When you need to prompt a path in your CLI app.
## Usage
```js
const { promptPath } = require("prompt-path");promptPath().then((path) => {
console.log(path);
});
```## Params (optional)
```js
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).