Skip to content
This repository has been archived by the owner on Aug 31, 2023. It is now read-only.

docs(website): update pnpm commands #2367

Merged
merged 1 commit into from
Apr 7, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 9 additions & 12 deletions website/src/_includes/docs/getting-started.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,12 @@ Rome currently doesn't support other editors than VS Code. [Let us know](https:/
Install `rome` using your preferred node package manager. We require a minimum Node version of v14.18.

> NOTE: we recommend **not** installing the binary globally, instead please install the binary
> locally to your project. You can also use `npx`, `pnpx` or `yarn dlx` to run `rome@next`.

> locally to your project. You can also use `npx`, `pnpm dlx` or `yarn dlx` to run `rome@next`.

| Package manager | Instructions |
|-------------------------------|-------------------------|
| ----------------------------- | ----------------------- |
| [npm](https://www.npmjs.com/) | `npm i -D rome@next` |
| [pnpm](https://pnpm.io/) | `pnpm i -D rome@next` |
| [pnpm](https://pnpm.io/) | `pnpm add -D rome@next` |
| [yarn](https://yarnpkg.com/) | `yarn add -D rome@next` |

If you install the CLI locally, use the [scripts field](https://docs.npmjs.com/cli/v8/using-npm/scripts) of your package.json to run Rome. For instance:
Expand All @@ -41,7 +40,7 @@ Then you can run:
```bash
npm run format
yarn format
pnpm run format
pnpm format
```

### Install Rome in your CI pipeline
Expand All @@ -52,10 +51,10 @@ Please refer to the [`setup-rome` action documentation](https://github.com/rome/

```yaml
steps:
- uses: rome/setup-rome@v0.1
with:
version: latest
- run: rome --help
- uses: rome/setup-rome@v0.1
with:
version: latest
- run: rome --help
```

#### Installation on any other CI
Expand All @@ -75,19 +74,17 @@ Where `<OS>` and `<ARCH>` follow the Node.js syntax convention:
> NOTE: For Windows Subsystem for Linux (WSL), please use `linux` as your OS

| | `win32` | `darwin` | `linux` |
|---------|-----------------|------------------|-----------------|
| ------- | --------------- | ---------------- | --------------- |
| `arm64` | [`win32-arm64`] | [`darwin-arm64`] | [`linux-arm64`] |
| `x64` | [`win32-x64`] | [`darwin-x64`] | [`linux-x64`] |

Please make sure to choose the correct architecture from the [releases page](https://github.com/rome/tools/releases).


## Post-Installation

- check the [formatter section](/formatter#use-the-formatter-with-the-cli) for options and commands;
- check the options available in the [VS Code extension](/formatter#use-the-formatter-with-the-vscode-extension)


[`win32-arm64`]: https://github.com/rome/tools/releases/latest/download/rome-win32-arm64.exe
[`darwin-arm64`]: https://github.com/rome/tools/releases/latest/download/rome-darwin-arm64
[`linux-arm64`]: https://github.com/rome/tools/releases/latest/download/rome-linux-arm64
Expand Down