@inquirer/select 0.0.17-alpha.0 → 0.0.20-alpha.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +2 -2
- package/README.md +53 -0
- package/package.json +4 -3
package/LICENSE
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
Copyright (c)
|
|
1
|
+
Copyright (c) 2022 Simon Boudrias
|
|
2
2
|
|
|
3
3
|
Permission is hereby granted, free of charge, to any person
|
|
4
4
|
obtaining a copy of this software and associated documentation
|
|
@@ -19,4 +19,4 @@ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
|
|
|
19
19
|
HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
|
|
20
20
|
WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
|
21
21
|
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
|
|
22
|
-
OTHER DEALINGS IN THE SOFTWARE.
|
|
22
|
+
OTHER DEALINGS IN THE SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
# `@inquirer/select`
|
|
2
|
+
|
|
3
|
+
Simple interactive command line prompt to display a list of choices (single select.)
|
|
4
|
+
|
|
5
|
+

|
|
6
|
+
|
|
7
|
+
# Installation
|
|
8
|
+
|
|
9
|
+
```sh
|
|
10
|
+
npm install @inquirer/select
|
|
11
|
+
|
|
12
|
+
yarn add @inquirer/select
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
# Usage
|
|
16
|
+
|
|
17
|
+
```js
|
|
18
|
+
import select from '@inquirer/select';
|
|
19
|
+
|
|
20
|
+
const answer = await select({
|
|
21
|
+
message: 'Select a package manager',
|
|
22
|
+
choices: [
|
|
23
|
+
{
|
|
24
|
+
name: 'npm',
|
|
25
|
+
value: 'npm',
|
|
26
|
+
description: 'npm is the most popular package manager',
|
|
27
|
+
},
|
|
28
|
+
{
|
|
29
|
+
name: 'yarn',
|
|
30
|
+
value: 'yarn',
|
|
31
|
+
description: 'yarn is an awesome package manager',
|
|
32
|
+
},
|
|
33
|
+
{
|
|
34
|
+
name: 'jspm',
|
|
35
|
+
value: 'jspm',
|
|
36
|
+
disabled: true,
|
|
37
|
+
},
|
|
38
|
+
],
|
|
39
|
+
});
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
## Options
|
|
43
|
+
|
|
44
|
+
| Property | Type | Required | Description |
|
|
45
|
+
| -------- | --------- | -------- | ------------------------------ |
|
|
46
|
+
| message | `string` | yes | The question to ask |
|
|
47
|
+
| choices | `Array<{ value: string, name?: string, description?: string, disabled?: boolean }>` | yes | List of the available choices. The `value` will be returned as the answer, and used as display if no `name` is defined. Choices who're `disabled` will be displayed, but not selectable. The `description` will be displayed under the prompt when the cursor land over the choice. |
|
|
48
|
+
| pageSize | `number` | no | By default, lists of choice longer than 7 will be paginated. Use this option to control how many choices will appear on the screen at once. |
|
|
49
|
+
|
|
50
|
+
# License
|
|
51
|
+
|
|
52
|
+
Copyright (c) 2022 Simon Boudrias (twitter: [@vaxilart](https://twitter.com/Vaxilart))
|
|
53
|
+
Licensed under the MIT license.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@inquirer/select",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.20-alpha.0",
|
|
4
4
|
"description": "Inquirer select/list prompt",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"repository": "SBoudrias/Inquirer.js",
|
|
@@ -12,13 +12,14 @@
|
|
|
12
12
|
],
|
|
13
13
|
"author": "Simon Boudrias",
|
|
14
14
|
"license": "MIT",
|
|
15
|
+
"homepage": "https://github.com/SBoudrias/Inquirer.js/blob/master/packages/select/README.md",
|
|
15
16
|
"dependencies": {
|
|
16
|
-
"@inquirer/core": "^0.0.
|
|
17
|
+
"@inquirer/core": "^0.0.20-alpha.0",
|
|
17
18
|
"chalk": "^4.1.1",
|
|
18
19
|
"figures": "^3.0.0"
|
|
19
20
|
},
|
|
20
21
|
"publishConfig": {
|
|
21
22
|
"access": "public"
|
|
22
23
|
},
|
|
23
|
-
"gitHead": "
|
|
24
|
+
"gitHead": "83b807522ca6e10ab90a6921eac9d9655e2dac38"
|
|
24
25
|
}
|