From ed52a9121fc5af1210108af029669d02b1e2e902 Mon Sep 17 00:00:00 2001 From: Lorna Jane Mitchell Date: Tue, 3 Sep 2024 21:12:18 +0100 Subject: [PATCH] docs: remove outdated yarn install instructions (#1710) --- docs/installation.md | 31 +++++++++---------------------- 1 file changed, 9 insertions(+), 22 deletions(-) diff --git a/docs/installation.md b/docs/installation.md index a87315612..89e48a0e0 100644 --- a/docs/installation.md +++ b/docs/installation.md @@ -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 [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. ## Run commands inside Docker