Skip to content

Commit

Permalink
docs: remove outdated yarn install instructions (#1710)
Browse files Browse the repository at this point in the history
  • Loading branch information
lornajane authored Sep 3, 2024
1 parent 2799d65 commit ed52a91
Showing 1 changed file with 9 additions and 22 deletions.
31 changes: 9 additions & 22 deletions docs/installation.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,54 +2,41 @@

Choose the most appropriate installation method for your needs:

- [Install locally, using `npm` or `yarn`](#install-globally) to make the `redocly` command available on your system.
- [Use `npx` to get the tool at runtime](#use-npx-at-runtime) rather than installing it.
- [Install locally, using `npm`](#install-globally) to make the `redocly` command available on your system.
- [Use `npx` to get the tool at runtime](#use-the-command-at-runtime) rather than installing it.
- The command is also [available via Docker](#docker) if you'd prefer to use it that way.

## Install globally

{% admonition type="success" name="Tip" %}
Make sure you have the newest version of `npm`/`yarn` before you begin.
Make sure you have the newest version of `npm` before you begin.
{% /admonition %}

{% tabs %}
{% tab label="npm" %}
Install the tool with the following command:

```shell
npm i -g @redocly/cli@latest
```

{% /tab %}
{% tab label="yarn" %}

```shell
yarn global add @redocly/cli
```

{% /tab %}
{% /tabs %}

Running `redocly --version` confirms that the installation was successful, and the currently-installed version of the tool.

## Use `npx` at runtime
## Use the command at runtime

[npx](https://docs.npmjs.com/cli/v9/commands/npx/) is npm's package runner. It installs and runs a command without installing it globally. You might use this where you can't install a new command, or in a CI context where the command is only used a handful of times.
{% tabs %}
{% tab label="Command" %}

To run Redocly CLI with `npx`, the command looks like the following example:

```shell
npx @redocly/cli <command> [options]
```

{% /tab %}
{% tab label="Example with lint command" %}
For example, to run `redocly lint` on a file named `openapi.yaml`, use the following command:

```shell
npx @redocly/cli@latest lint openapi.yaml
```

{% /tab %}
{% /tabs %}
Replace `redocly` with `npx @redocly/cli@latest` to prepend to other commands you see in documentation.

## <a id="docker"></a>Run commands inside Docker

Expand Down

1 comment on commit ed52a91

@github-actions
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Coverage report

St.
Category Percentage Covered / Total
🟡 Statements 78.05% 4871/6241
🟡 Branches 66.43% 2007/3021
🟡 Functions 72.52% 805/1110
🟡 Lines 78.34% 4592/5862

Test suite run success

786 tests passing in 118 suites.

Report generated by 🧪jest coverage report action from ed52a91

Please sign in to comment.