Skip to content

Commit 781161c

Browse files
Update docs for the new CLI command init (#4394)
1 parent b0a0fb1 commit 781161c

File tree

11 files changed

+16
-16
lines changed

11 files changed

+16
-16
lines changed

docs/src/components/mdxComponents/CodeBlocks.stories.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ export const Pre = () => (
1313
<CodeBlocks.Pre className="">
1414
<code>
1515
{`
16-
$ npx hardhat
16+
$ npx hardhat init
1717
888 888 888 888 888
1818
888 888 888 888 888
1919
888 888 888 888 888

docs/src/content/hardhat-runner/docs/advanced/hardhat-and-foundry.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ yarn add --dev hardhat @nomicfoundation/hardhat-foundry
108108

109109
::::
110110

111-
After that, initialize a Hardhat project with `npx hardhat`. Choose the "Create an empty hardhat.config.js" option, and then import the plugin in `hardhat.config.js`:
111+
After that, initialize a Hardhat project with `npx hardhat init`. Choose the "Create an empty hardhat.config.js" option, and then import the plugin in `hardhat.config.js`:
112112

113113
```javascript
114114
require("@nomicfoundation/hardhat-foundry");

docs/src/content/hardhat-runner/docs/advanced/scripts.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ const hre = require("hardhat");
2424

2525
You can get access to all your tasks and plugins. To run these scripts you simply go through node: `node script.js`.
2626

27-
To try this out, let's look at [a fresh Hardhat project](../guides/project-setup.md). Run `npx hardhat` and go through the steps to create a JavaScript project. When you're done, your project directory should look like this:
27+
To try this out, let's look at [a fresh Hardhat project](../guides/project-setup.md). Run `npx hardhat init` and go through the steps to create a JavaScript project. When you're done, your project directory should look like this:
2828

2929
```
3030
$ ls -l

docs/src/content/hardhat-runner/docs/advanced/using-esm.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ yarn add --dev hardhat
8080

8181
::::
8282

83-
and run `npx hardhat` to create a Hardhat project:
83+
and run `npx hardhat init` to create a Hardhat project:
8484

8585
```
8686
888 888 888 888 888

docs/src/content/hardhat-runner/docs/getting-started/index.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ yarn add --dev hardhat
5555

5656
::::
5757

58-
To use your local installation of Hardhat, you need to use `npx` to run it (i.e. `npx hardhat`).
58+
To use your local installation of Hardhat, you need to use `npx` to run it (i.e. `npx hardhat init`).
5959

6060
## Quick Start
6161

@@ -67,10 +67,10 @@ If you are using Windows, we **strongly recommend** using [WSL 2](https://docs.m
6767

6868
We will explore the basics of creating a Hardhat project with a sample contract, tests of that contract, and a script to deploy it.
6969

70-
To create the sample project, run `npx hardhat` in your project folder:
70+
To create the sample project, run `npx hardhat init` in your project folder:
7171

7272
```
73-
$ npx hardhat
73+
$ npx hardhat init
7474
888 888 888 888 888
7575
888 888 888 888 888
7676
888 888 888 888 888

docs/src/content/hardhat-runner/docs/guides/project-setup.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -68,10 +68,10 @@ yarn add --dev hardhat
6868

6969
::::
7070

71-
If you run `npx hardhat` now, you will be shown some options to facilitate project creation:
71+
If you run `npx hardhat init` now, you will be shown some options to facilitate project creation:
7272

7373
```
74-
$ npx hardhat
74+
$ npx hardhat init
7575
888 888 888 888 888
7676
888 888 888 888 888
7777
888 888 888 888 888

docs/src/content/hardhat-runner/docs/guides/typescript.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ yarn add --dev chai @types/node @types/mocha @types/chai
8080

8181
You can easily turn a JavaScript Hardhat config file into a TypeScript one. Let's see how this is done starting with a fresh Hardhat project.
8282

83-
Open your terminal, go to an empty folder, run `npx hardhat`, and go through the steps to create a JavaScript project. When you're done your project directory should look something like this:
83+
Open your terminal, go to an empty folder, run `npx hardhat init`, and go through the steps to create a JavaScript project. When you're done your project directory should look something like this:
8484

8585
```
8686
$ ls -l

docs/src/content/hardhat-runner/docs/other-guides/truffle-testing.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ npm init --yes
2121
npm install --save-dev hardhat
2222
```
2323

24-
Now run `npx hardhat` inside your project folder and select `Create an empty hardhat.config.js`.
24+
Now run `npx hardhat init` inside your project folder and select `Create an empty hardhat.config.js`.
2525

2626
Let's now install the `Truffle` and `Web3.js` plugins, as well as `web3.js` itself.
2727

docs/src/content/hardhat-runner/docs/other-guides/waffle-testing.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -20,10 +20,10 @@ Ethers and Waffle support TypeScript. Learn how to set up Hardhat with TypeScrip
2020

2121
## Setting up
2222

23-
[Install Hardhat](/hardhat-runner/docs/getting-started/index.md#installation) on an empty directory. When done, run `npx hardhat`:
23+
[Install Hardhat](/hardhat-runner/docs/getting-started/index.md#installation) on an empty directory. When done, run `npx hardhat init`:
2424

2525
```
26-
$ npx hardhat
26+
$ npx hardhat init
2727
888 888 888 888 888
2828
888 888 888 888 888
2929
888 888 888 888 888

docs/src/content/tutorial/creating-a-new-hardhat-project.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -80,13 +80,13 @@ yarn add --dev hardhat
8080
In the same directory where you installed Hardhat run:
8181

8282
```
83-
npx hardhat
83+
npx hardhat init
8484
```
8585

8686
Select `Create an empty hardhat.config.js` with your keyboard and hit enter.
8787

8888
```markup{16}
89-
$ npx hardhat
89+
$ npx hardhat init
9090
888 888 888 888 888
9191
888 888 888 888 888
9292
888 888 888 888 888

packages/hardhat-core/README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ npm install --save-dev hardhat
1919
Once it's installed, just run this command and follow its instructions:
2020

2121
```
22-
npx hardhat
22+
npx hardhat init
2323
```
2424

2525
## Documentation

0 commit comments

Comments
 (0)