Skip to content

Commit

Permalink
Chore(docs): Review install instruction for easy copy-paste (#1450)
Browse files Browse the repository at this point in the history
  • Loading branch information
SBoudrias committed Jun 30, 2024
1 parent fc27d57 commit 5cc1e6d
Show file tree
Hide file tree
Showing 13 changed files with 213 additions and 6 deletions.
17 changes: 17 additions & 0 deletions packages/checkbox/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,29 @@ Simple interactive command line prompt to display a list of checkboxes (multi se

# Installation

<table>
<tr>
<th>npm</th>
<th>yarn</th>
</tr>
<tr>
<td>

```sh
npm install @inquirer/checkbox
```

</td>
<td>

```sh
yarn add @inquirer/checkbox
```

</td>
</tr>
</table>

# Usage

```js
Expand Down
17 changes: 17 additions & 0 deletions packages/confirm/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,29 @@ Simple interactive command line prompt to gather boolean input from users.

# Installation

<table>
<tr>
<th>npm</th>
<th>yarn</th>
</tr>
<tr>
<td>

```sh
npm install @inquirer/confirm
```

</td>
<td>

```sh
yarn add @inquirer/confirm
```

</td>
</tr>
</table>

# Usage

```js
Expand Down
17 changes: 17 additions & 0 deletions packages/core/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,29 @@ It aims to implements a lightweight API similar to React hooks - but without JSX

# Installation

<table>
<tr>
<th>npm</th>
<th>yarn</th>
</tr>
<tr>
<td>

```sh
npm install @inquirer/core
```

</td>
<td>

```sh
yarn add @inquirer/core
```

</td>
</tr>
</table>

# Usage

```ts
Expand Down
17 changes: 17 additions & 0 deletions packages/editor/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,29 @@ Prompt that'll open the user preferred editor with default content and allow for

# Installation

<table>
<tr>
<th>npm</th>
<th>yarn</th>
</tr>
<tr>
<td>

```sh
npm install @inquirer/editor
```

</td>
<td>

```sh
yarn add @inquirer/editor
```

</td>
</tr>
</table>

# Usage

```js
Expand Down
17 changes: 17 additions & 0 deletions packages/expand/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,29 @@ Compact single select prompt. Every option is assigned a shortcut key, and selec

# Installation

<table>
<tr>
<th>npm</th>
<th>yarn</th>
</tr>
<tr>
<td>

```sh
npm install @inquirer/expand
```

</td>
<td>

```sh
yarn add @inquirer/expand
```

</td>
</tr>
</table>

# Usage

```js
Expand Down
17 changes: 17 additions & 0 deletions packages/input/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,29 @@ Interactive free text input component for command line interfaces. Supports vali

# Installation

<table>
<tr>
<th>npm</th>
<th>yarn</th>
</tr>
<tr>
<td>

```sh
npm install @inquirer/input
```

</td>
<td>

```sh
yarn add @inquirer/input
```

</td>
</tr>
</table>

# Usage

```js
Expand Down
8 changes: 5 additions & 3 deletions packages/inquirer/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,7 @@

A collection of common interactive command line user interfaces.

### Note:

> [!IMPORTANT]
> This is the legacy version of Inquirer.js. While it still receives maintenance, it is not actively developed. For the new Inquirer, see [@inquirer/prompts](https://www.npmjs.com/package/@inquirer/prompts).
## Table of Contents
Expand Down Expand Up @@ -76,7 +75,10 @@ inquirer
});
```

Inquirer v9 and higher are native esm modules, this mean you cannot use the commonjs syntax `require('inquirer')` anymore. If you want to learn more about using native esm in Node, I'd recommend reading [the following guide](https://gist.github.com/sindresorhus/a39789f98801d908bbc7ff3ecc99d99c). Alternatively, you can rely on an older version until you're ready to upgrade your environment:
> [!WARNING]
> Inquirer v9 and higher are native esm modules, this mean you cannot use the commonjs syntax `require('inquirer')` anymore. If you want to learn more about using native esm in Node, I'd recommend reading [the following guide](https://gist.github.com/sindresorhus/a39789f98801d908bbc7ff3ecc99d99c).
Alternatively, if you require a commonjs module, you should rely on an older version until you're ready to upgrade your environment:

```sh
npm install --save inquirer@^8.0.0
Expand Down
17 changes: 17 additions & 0 deletions packages/number/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,29 @@ Interactive free number input component for command line interfaces. Supports va

# Installation

<table>
<tr>
<th>npm</th>
<th>yarn</th>
</tr>
<tr>
<td>

```sh
npm install @inquirer/number
```

</td>
<td>

```sh
yarn add @inquirer/number
```

</td>
</tr>
</table>

# Usage

```js
Expand Down
17 changes: 17 additions & 0 deletions packages/password/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,29 @@ Interactive password input component for command line interfaces. Supports input

# Installation

<table>
<tr>
<th>npm</th>
<th>yarn</th>
</tr>
<tr>
<td>

```sh
npm install @inquirer/password
```

</td>
<td>

```sh
yarn add @inquirer/password
```

</td>
</tr>
</table>

# Usage

```js
Expand Down
20 changes: 19 additions & 1 deletion packages/prompts/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,31 @@ npx @inquirer/demo@latest

# Installation

<table>
<tr>
<th>npm</th>
<th>yarn</th>
</tr>
<tr>
<td>

```sh
npm install @inquirer/prompts
```

</td>
<td>

```sh
yarn add @inquirer/prompts
```

Inquirer recently underwent a rewrite from the ground up to reduce the package size and improve performance. The previous version of the package is still maintained (though not actively developed), and offered hundreds of community contributed prompts that might not have been migrated to the latest API. If this is what you're looking for, the [previous package is over here](https://github.com/SBoudrias/Inquirer.js/tree/master/packages/inquirer).
</td>
</tr>
</table>

> [!NOTE]
> Inquirer recently underwent a rewrite from the ground up to reduce the package size and improve performance. The previous version of the package is still maintained (though not actively developed), and offered hundreds of community contributed prompts that might not have been migrated to the latest API. If this is what you're looking for, the [previous package is over here](https://github.com/SBoudrias/Inquirer.js/tree/master/packages/inquirer).
# Usage

Expand Down
17 changes: 17 additions & 0 deletions packages/rawlist/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,29 @@ Simple interactive command line prompt to display a raw list of choices (single

# Installation

<table>
<tr>
<th>npm</th>
<th>yarn</th>
</tr>
<tr>
<td>

```sh
npm install @inquirer/rawlist
```

</td>
<td>

```sh
yarn add @inquirer/rawlist
```

</td>
</tr>
</table>

# Usage

```js
Expand Down
17 changes: 17 additions & 0 deletions packages/select/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,29 @@ Simple interactive command line prompt to display a list of choices (single sele

# Installation

<table>
<tr>
<th>npm</th>
<th>yarn</th>
</tr>
<tr>
<td>

```sh
npm install @inquirer/select
```

</td>
<td>

```sh
yarn add @inquirer/select
```

</td>
</tr>
</table>

# Usage

```js
Expand Down
21 changes: 19 additions & 2 deletions packages/testing/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,29 @@ The `@inquirer/testing` package is Inquirer's answer to testing prompts [built w

# Installation

<table>
<tr>
<th>npm</th>
<th>yarn</th>
</tr>
<tr>
<td>

```sh
npm install @inquirer/testing
npm install @inquirer/testing --save-dev
```

</td>
<td>

yarn add @inquirer/testing
```sh
yarn add @inquirer/testing --dev
```

</td>
</tr>
</table>

# Example

Here's an example of a test running with Jest (though `@inquirer/testing` will work with any runners).
Expand Down

0 comments on commit 5cc1e6d

Please sign in to comment.