Skip to content

Commit

Permalink
docs: standardize shell commands in the docs (#1470)
Browse files Browse the repository at this point in the history
  • Loading branch information
richardgreg authored Dec 12, 2023
1 parent 3669c1a commit 3f0c18f
Show file tree
Hide file tree
Showing 29 changed files with 74 additions and 64 deletions.
6 changes: 6 additions & 0 deletions .changeset/cuddly-days-wink.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
docs: standardize shell commands in the docs
---

Removed `yarn`, ensured all examples have two variations and tabularized
examples.
4 changes: 0 additions & 4 deletions apps/docs/src/getting-started.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,6 @@ To begin, you need to add the `fuels` dependency to your project. You can do thi
npm install fuels --save
```

```sh [yarn]
yarn add fuels
```

```sh [pnpm]
pnpm add fuels
```
Expand Down
10 changes: 5 additions & 5 deletions apps/docs/src/guide/abi-typegen/generating-types-from-abi.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,15 @@
First we install `fuels` to our project:

```console
yarn add fuels
pnpm add fuels
```

## Help

A first glance at the docs:

```console
$ yarn exec fuels typegen -h
$ pnpm fuels typegen -h

Usage: fuels typegen [options]

Expand All @@ -36,7 +36,7 @@ You can generate types for a Sway contract using the command below:
<!-- gen_types:example:start -->

```console
yarn exec fuels typegen -i ./abis/*-abi.json -o ./types
pnpm fuels typegen -i ./abis/*-abi.json -o ./types
```

<!-- gen_types:example:end -->
Expand All @@ -57,15 +57,15 @@ You can omit the `--contract` option here since it's the default.
To generate types for a Sway script, use the `--script` flag:

```console
yarn exec fuels typegen -i ./abis/*-abi.json -o ./types --script
pnpm fuels typegen -i ./abis/*-abi.json -o ./types --script
```

## Generating Types for Predicates

To generate types for a Sway predicate, use the `--predicate` flag:

```console
yarn exec fuels typegen -i ./abis/*-abi.json -o ./types --predicate
pnpm fuels typegen -i ./abis/*-abi.json -o ./types --predicate
```

---
Expand Down
6 changes: 3 additions & 3 deletions apps/docs/src/guide/abi-typegen/using-generated-types.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
After generating types via:

```console
yarn exec fuels typegen -i ./abis/*-abi.json -o ./types
pnpm fuels typegen -i ./abis/*-abi.json -o ./types
```

We can use these files like so:
Expand Down Expand Up @@ -59,7 +59,7 @@ const contract = await MyContract__factory.deployContract(bytecode, wallet, {
After generating types via:

```console
yarn exec fuels typegen -i ./abis/*-abi.json -o ./types --script
pnpm fuels typegen -i ./abis/*-abi.json -o ./types --script
```

We can use these files like so:
Expand Down Expand Up @@ -87,7 +87,7 @@ Consider the following predicate:
Now, after generating types via:

```console
yarn exec fuels typegen -i ./abis/*-abi.json -o ./types --predicate
pnpm fuels typegen -i ./abis/*-abi.json -o ./types --predicate
```

We can use these files like so:
Expand Down
10 changes: 9 additions & 1 deletion apps/docs/src/guide/cli/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,18 @@ my-fuel-dapp # NextJS app or similar

Add it to your `my-fuel-dapp` project:

```console
::: code-group

```console [npm]
npm install fuels --save
```

```console [pnpm]
pnpm add fuels
```

:::

## Double-checking

```console
Expand Down
12 changes: 6 additions & 6 deletions apps/docs/src/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,18 +34,18 @@ Learn more about the Fuel Ecosystem.

## Install

#### YARN
::: code-group

```sh
yarn add fuels
```sh [pnpm]
pnpm add fuels
```

#### NPM

```sh
```sh [npm]
npm install fuels --save
```

:::

## Import

<!-- TODO: stop using hard-coded snippets -->
Expand Down
4 changes: 2 additions & 2 deletions packages/abi-coder/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ See [Fuels-ts Documentation](https://fuellabs.github.io/fuels-ts/)
### Installation

```sh
yarn add @fuel-ts/abi-coder
pnpm add @fuel-ts/abi-coder
# or
npm add @fuel-ts/abi-coder
```
Expand All @@ -35,7 +35,7 @@ npm add @fuel-ts/abi-coder
Alternatively, we recommend you install the [complete SDK](https://github.com/FuelLabs/fuels-ts) using the umbrella package:

```sh
yarn add fuels
pnpm add fuels
# or
npm add fuels
```
Expand Down
6 changes: 3 additions & 3 deletions packages/abi-typegen/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,9 @@ See [Fuels-ts Documentation](https://fuellabs.github.io/fuels-ts/guide/abi-typeg
## Installation

```sh
yarn add @fuel-ts/abi-typegen
pnpm add @fuel-ts/abi-typegen
# or
npm add @fuel-ts/abi-typegen
nppnpmm add @fuel-ts/abi-typegen
```

## Help
Expand Down Expand Up @@ -76,7 +76,7 @@ import { ProgramTypeEnum, runTypegen } from "@fuel-ts/abi-typegen";
Alternatively, we recommend you install the [complete SDK](https://github.com/FuelLabs/fuels-ts) using the umbrella package:

```sh
yarn add fuels
pnpm add fuels
# or
npm add fuels
```
Expand Down
4 changes: 2 additions & 2 deletions packages/address/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ See [Fuels-ts Documentation](https://fuellabs.github.io/fuels-ts/guide/types/add
### Installation

```sh
yarn add @fuel-ts/address
pnpm add @fuel-ts/address
# or
npm add @fuel-ts/address
```
Expand All @@ -33,7 +33,7 @@ npm add @fuel-ts/address
Alternatively, we recommend you install the [complete SDK](https://github.com/FuelLabs/fuels-ts) using the umbrella package:

```sh
yarn add fuels
pnpm add fuels
# or
npm add fuels
```
Expand Down
4 changes: 2 additions & 2 deletions packages/contract/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ See [Fuels-ts Documentation](https://fuellabs.github.io/fuels-ts/guide/contracts
### Installation

```sh
yarn add @fuel-ts/contract
pnpm add @fuel-ts/contract
# or
npm add @fuel-ts/contract
```
Expand All @@ -33,7 +33,7 @@ npm add @fuel-ts/contract
Alternatively, we recommend you install the [complete SDK](https://github.com/FuelLabs/fuels-ts) using the umbrella package:

```sh
yarn add fuels
pnpm add fuels
# or
npm add fuels
```
Expand Down
4 changes: 2 additions & 2 deletions packages/crypto/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ See [Fuels-ts Documentation](https://fuellabs.github.io/fuels-ts/)
### Installation

```sh
yarn add @fuel-ts/crypto
pnpm add @fuel-ts/crypto
# or
npm add @fuel-ts/crypto
```
Expand All @@ -35,7 +35,7 @@ npm add @fuel-ts/crypto
Alternatively, we recommend you install the [complete SDK](https://github.com/FuelLabs/fuels-ts) using the umbrella package:

```sh
yarn add fuels
pnpm add fuels
# or
npm add fuels
```
Expand Down
2 changes: 1 addition & 1 deletion packages/errors/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ See [Fuels-ts Documentation](https://fuellabs.github.io/fuels-ts/)
### Installation

```sh
yarn add @fuel-ts/errors
pnpm add @fuel-ts/errors
# or
npm add @fuel-ts/errors
```
Expand Down
4 changes: 2 additions & 2 deletions packages/hasher/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ See [Fuels-ts Documentation](https://fuellabs.github.io/fuels-ts/)
### Installation

```sh
yarn add @fuel-ts/hasher
pnpm add @fuel-ts/hasher
# or
npm add @fuel-ts/hasher
```
Expand All @@ -35,7 +35,7 @@ npm add @fuel-ts/hasher
Alternatively, we recommend you install the [complete SDK](https://github.com/FuelLabs/fuels-ts) using the umbrella package:

```sh
yarn add fuels
pnpm add fuels
# or
npm add fuels
```
Expand Down
4 changes: 2 additions & 2 deletions packages/hdwallet/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ See [Fuels-ts Documentation](https://fuellabs.github.io/fuels-ts/)
### Installation

```sh
yarn add @fuel-ts/hdwallet
pnpm add @fuel-ts/hdwallet
# or
npm add @fuel-ts/hdwallet
```
Expand All @@ -35,7 +35,7 @@ npm add @fuel-ts/hdwallet
Alternatively, we recommend you install the [complete SDK](https://github.com/FuelLabs/fuels-ts) using the umbrella package:

```sh
yarn add fuels
pnpm add fuels
# or
npm add fuels
```
Expand Down
4 changes: 2 additions & 2 deletions packages/interfaces/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ See [Fuels-ts Documentation](https://fuellabs.github.io/fuels-ts/)
### Installation

```sh
yarn add @fuel-ts/interfaces
pnpm add @fuel-ts/interfaces
# or
npm add @fuel-ts/interfaces
```
Expand All @@ -35,7 +35,7 @@ npm add @fuel-ts/interfaces
Alternatively, we recommend you install the [complete SDK](https://github.com/FuelLabs/fuels-ts) using the umbrella package:

```sh
yarn add fuels
pnpm add fuels
# or
npm add fuels
```
Expand Down
4 changes: 2 additions & 2 deletions packages/math/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ See [Fuels-ts Documentation](https://fuellabs.github.io/fuels-ts/)
### Installation

```sh
yarn add @fuel-ts/math
pnpm add @fuel-ts/math
# or
npm add @fuel-ts/math
```
Expand All @@ -37,7 +37,7 @@ npm add @fuel-ts/math
Alternatively, we recommend you install the [complete SDK](https://github.com/FuelLabs/fuels-ts) using the umbrella package:

```sh
yarn add fuels
pnpm add fuels
# or
npm add fuels
```
Expand Down
4 changes: 2 additions & 2 deletions packages/merkle/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ See [Fuels-ts Documentation](https://fuellabs.github.io/fuels-ts/)
### Installation

```sh
yarn add @fuel-ts/merkle
pnpm add @fuel-ts/merkle
# or
npm add @fuel-ts/merkle
```
Expand All @@ -40,7 +40,7 @@ npm add @fuel-ts/merkle
Alternatively, we recommend you install the [complete SDK](https://github.com/FuelLabs/fuels-ts) using the umbrella package:

```sh
yarn add fuels
pnpm add fuels
# or
npm add fuels
```
Expand Down
4 changes: 2 additions & 2 deletions packages/mnemonic/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ See [Fuels-ts Documentation](https://fuellabs.github.io/fuels-ts/)
### Installation

```sh
yarn add @fuel-ts/mnemonic
pnpm add @fuel-ts/mnemonic
# or
npm add @fuel-ts/mnemonic
```
Expand All @@ -35,7 +35,7 @@ npm add @fuel-ts/mnemonic
Alternatively, we recommend you install the [complete SDK](https://github.com/FuelLabs/fuels-ts) using the umbrella package:

```sh
yarn add fuels
pnpm add fuels
# or
npm add fuels
```
Expand Down
4 changes: 2 additions & 2 deletions packages/predicate/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ See [Fuels-ts Documentation](https://fuellabs.github.io/fuels-ts/guide/predicate
### Installation

```sh
yarn add @fuel-ts/predicate
pnpm add @fuel-ts/predicate
# or
npm add @fuel-ts/predicate
```
Expand All @@ -33,7 +33,7 @@ npm add @fuel-ts/predicate
Alternatively, we recommend you install the [complete SDK](https://github.com/FuelLabs/fuels-ts) using the umbrella package:

```sh
yarn add fuels
pnpm add fuels
# or
npm add fuels
```
Expand Down
4 changes: 2 additions & 2 deletions packages/program/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ See [Fuels-ts Documentation](https://fuellabs.github.io/fuels-ts/)
### Installation

```sh
yarn add @fuel-ts/program
pnpm add @fuel-ts/program
# or
npm add @fuel-ts/program
```
Expand All @@ -35,7 +35,7 @@ npm add @fuel-ts/program
Alternatively, we recommend you install the [complete SDK](https://github.com/FuelLabs/fuels-ts) using the umbrella package:

```sh
yarn add fuels
pnpm add fuels
# or
npm add fuels
```
Expand Down
4 changes: 2 additions & 2 deletions packages/providers/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ See [Fuels-ts Documentation](https://fuellabs.github.io/fuels-ts/guide/providers
### Installation

```sh
yarn add @fuel-ts/providers
pnpm add @fuel-ts/providers
# or
npm add @fuel-ts/providers
```
Expand All @@ -33,7 +33,7 @@ npm add @fuel-ts/providers
Alternatively, we recommend you install the [complete SDK](https://github.com/FuelLabs/fuels-ts) using the umbrella package:

```sh
yarn add fuels
pnpm add fuels
# or
npm add fuels
```
Expand Down
Loading

0 comments on commit 3f0c18f

Please sign in to comment.