diff --git a/.changeset/cuddly-days-wink.md b/.changeset/cuddly-days-wink.md new file mode 100644 index 00000000000..78bb3ea5f82 --- /dev/null +++ b/.changeset/cuddly-days-wink.md @@ -0,0 +1,6 @@ +--- +docs: standardize shell commands in the docs +--- + +Removed `yarn`, ensured all examples have two variations and tabularized +examples. diff --git a/apps/docs/src/getting-started.md b/apps/docs/src/getting-started.md index 64ec3a3f0a4..e71ed1ccd9b 100644 --- a/apps/docs/src/getting-started.md +++ b/apps/docs/src/getting-started.md @@ -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 ``` diff --git a/apps/docs/src/guide/abi-typegen/generating-types-from-abi.md b/apps/docs/src/guide/abi-typegen/generating-types-from-abi.md index c01e89a8160..93a2b44e051 100644 --- a/apps/docs/src/guide/abi-typegen/generating-types-from-abi.md +++ b/apps/docs/src/guide/abi-typegen/generating-types-from-abi.md @@ -5,7 +5,7 @@ First we install `fuels` to our project: ```console -yarn add fuels +pnpm add fuels ``` ## Help @@ -13,7 +13,7 @@ yarn add fuels A first glance at the docs: ```console -$ yarn exec fuels typegen -h +$ pnpm fuels typegen -h Usage: fuels typegen [options] @@ -36,7 +36,7 @@ You can generate types for a Sway contract using the command below: ```console -yarn exec fuels typegen -i ./abis/*-abi.json -o ./types +pnpm fuels typegen -i ./abis/*-abi.json -o ./types ``` @@ -57,7 +57,7 @@ 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 @@ -65,7 +65,7 @@ yarn exec fuels typegen -i ./abis/*-abi.json -o ./types --script 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 ``` --- diff --git a/apps/docs/src/guide/abi-typegen/using-generated-types.md b/apps/docs/src/guide/abi-typegen/using-generated-types.md index 98991109a43..88d14f23ab3 100644 --- a/apps/docs/src/guide/abi-typegen/using-generated-types.md +++ b/apps/docs/src/guide/abi-typegen/using-generated-types.md @@ -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: @@ -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: @@ -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: diff --git a/apps/docs/src/guide/cli/index.md b/apps/docs/src/guide/cli/index.md index 695f9a85cc1..96e09c32b4d 100644 --- a/apps/docs/src/guide/cli/index.md +++ b/apps/docs/src/guide/cli/index.md @@ -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 diff --git a/apps/docs/src/index.md b/apps/docs/src/index.md index 0152de2da36..e777f3d602d 100644 --- a/apps/docs/src/index.md +++ b/apps/docs/src/index.md @@ -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