You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: readme.md
+8-25Lines changed: 8 additions & 25 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -72,19 +72,18 @@ test('arrays are equal', t => {
72
72
73
73
### Add AVA to your project
74
74
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`:
77
76
78
77
```console
79
-
$ npm install --global ava@next
80
-
$ ava --init
78
+
$ npm install ava@next --save-dev
79
+
$ npx ava --init
81
80
```
82
81
83
-
If you prefer using Yarn:
82
+
If you prefer using [Yarn](https://yarnpkg.com/en/):
84
83
85
84
```console
86
-
$ yarn global add ava@next
87
-
$ ava --init
85
+
$ yarn add --dev ava@next
86
+
$ yarn run ava --init
88
87
```
89
88
90
89
Your `package.json` will then look like this:
@@ -96,28 +95,12 @@ Your `package.json` will then look like this:
96
95
"test": "ava"
97
96
},
98
97
"devDependencies": {
99
-
"ava": "^1.0.0-beta.1"
98
+
"ava": "^1.0.0-beta.3"
100
99
}
101
100
}
102
101
```
103
102
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).
0 commit comments