Skip to content

Commit d3bade8

Browse files
martypdxnovemberborn
authored andcommitted
Suggest running ava with npx
Remove global installation suggestion.
1 parent e9d417f commit d3bade8

1 file changed

Lines changed: 8 additions & 25 deletions

File tree

readme.md

Lines changed: 8 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -72,19 +72,18 @@ test('arrays are equal', t => {
7272

7373
### Add AVA to your project
7474

75-
Install AVA globally and run it with `--init` to add AVA to your `package.json`.
76-
75+
Install AVA and run it with `--init` to add AVA to your `package.json`:
7776

7877
```console
79-
$ npm install --global ava@next
80-
$ ava --init
78+
$ npm install ava@next --save-dev
79+
$ npx ava --init
8180
```
8281

83-
If you prefer using Yarn:
82+
If you prefer using [Yarn](https://yarnpkg.com/en/):
8483

8584
```console
86-
$ yarn global add ava@next
87-
$ ava --init
85+
$ yarn add --dev ava@next
86+
$ yarn run ava --init
8887
```
8988

9089
Your `package.json` will then look like this:
@@ -96,28 +95,12 @@ Your `package.json` will then look like this:
9695
"test": "ava"
9796
},
9897
"devDependencies": {
99-
"ava": "^1.0.0-beta.1"
98+
"ava": "^1.0.0-beta.3"
10099
}
101100
}
102101
```
103102

104-
Any arguments passed after `--init` are added as config to `package.json`.
105-
106-
#### Manual installation
107-
108-
You can also install AVA directly:
109-
110-
```console
111-
$ npm install --save-dev ava@next
112-
```
113-
114-
Alternatively using Yarn:
115-
116-
```console
117-
$ yarn add --dev ava@next
118-
```
119-
120-
You'll have to configure the `test` script in your `package.json` to use `ava` (see above).
103+
Running `npx` requires [`npm@5.2.0`](https://github.com/npm/npm/releases/tag/v5.2.0) or greater. Otherwise, you'll have to manually configure the `test` script in your `package.json` to use `ava` (see above).
121104

122105
### Create your test file
123106

0 commit comments

Comments
 (0)