Skip to content

Commit 71e3a50

Browse files
authored
feat: Don't bundle axe-core (#69)
This allows consumers to use their own version of axe-core and significantly reduces the installation size. Also allow any 3.x or 4.x versions of axe-core in peer dependencies. Closes #65, closes #59
1 parent e3e2717 commit 71e3a50

File tree

5 files changed

+1523
-8446
lines changed

5 files changed

+1523
-8446
lines changed

README.md

Lines changed: 8 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -2,35 +2,29 @@
22

33
[![npm](https://img.shields.io/npm/v/cypress-axe.svg)](https://www.npmjs.com/package/cypress-axe)
44

5-
This package provides three simple [Cypress](https://cypress.io) commands to help test your applications for accessibility issues using [axe-core](https://github.com/dequelabs/axe-core).
5+
Test accessibility with [axe-core](https://github.com/dequelabs/axe-core) in [Cypress](https://cypress.io).
66

7-
## Install and configure
7+
## Installation
88

9-
### Add as a dev dependency:
9+
1. **Install `cypress-axe` from npm:**
1010

1111
```sh
12-
npm i -D cypress-axe
12+
npm install --save-dev cypress-axe
1313
```
1414

15-
### Install peer dependencies:
15+
2. **Install peer dependencies:**
1616

1717
```sh
18-
npm i -D cypress
18+
npm install --save-dev cypress axe-core
1919
```
2020

21-
**NOTE:** _axe-core is now bundled and doesn't need to be installed as a peer dependency_
22-
23-
### Include the commands
24-
25-
Update `Cypress/support/index.js` file to include the cypress-axe commands by adding:
21+
3. **Include the commands.** Update `cypress/support/index.js` file to include the cypress-axe commands by adding:
2622

2723
```js
2824
import 'cypress-axe'
2925
```
3026

31-
### Add a task to log the messages to the terminal when the cypress executes the spec files
32-
33-
[Example - configuring log task](https://docs.cypress.io/api/commands/task.html#Usage)
27+
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).
3428

3529
## Commands
3630

0 commit comments

Comments
 (0)