Skip to content

Commit 21f8fee

Browse files
authored
Simplify installation instructions (#175)
This way, there's no need to run `npm install` two times.
1 parent 73bbfc0 commit 21f8fee

File tree

1 file changed

+7
-21
lines changed

1 file changed

+7
-21
lines changed

README.md

Lines changed: 7 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -6,35 +6,21 @@ Test accessibility with [axe-core](https://github.com/dequelabs/axe-core) in [Cy
66

77
## Installation
88

9-
1. **Install `cypress-axe` from npm:**
9+
1. **Install `cypress-axe` and peer dependencies from npm:**
1010

11-
- For Cypress v10 and above install latest cypress-axe
11+
- For Cypress v10 and above, install the latest axe-core, cypress, and cypress-axe
1212

1313
```sh
14-
npm install --save-dev cypress-axe
14+
npm install --save-dev axe-core cypress cypress-axe
1515
```
1616

17-
- For Cypress v9 install 0.x.x
17+
- For Cypress v9, install cypress-axe 0.x.x and your specific cypress version. For example, if you are using cypress v9.6.0
1818

1919
```sh
20-
npm install --save-dev [email protected]
20+
npm install --save-dev axe-core [email protected] [email protected]
2121
```
2222

23-
1. **Install peer dependencies:**
24-
25-
- For Cypress v10 and above
26-
27-
```sh
28-
npm install --save-dev cypress axe-core
29-
```
30-
31-
- For Cypress v9 and below install the specific cypress version you are using For example if you are using cypress v9.6.0
32-
33-
```sh
34-
npm install --save-dev [email protected] axe-core
35-
```
36-
37-
1. **Include the commands.**
23+
2. **Include the commands.**
3824

3925
- For Cypress v10 and above update `cypress/support/e2e.js` file to include the cypress-axe commands by adding:
4026
- For Cypress v9 and below update `cypress/support/index.js` file to include the cypress-axe commands by adding:
@@ -43,7 +29,7 @@ npm install --save-dev [email protected] axe-core
4329
import 'cypress-axe'
4430
```
4531

46-
4. **Add a task to log the messages to the terminal** when Cypress executes the spec files. [Example - configuring log task](https://docs.cypress.io/api/commands/task.html#Usage).
32+
3. **Add a task to log the messages to the terminal** when Cypress executes the spec files. [Example - configuring log task](https://docs.cypress.io/api/commands/task.html#Usage).
4733

4834
### TypeScript
4935

0 commit comments

Comments
 (0)