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
+26-5
Original file line number
Diff line number
Diff line change
@@ -53,31 +53,38 @@ With this in place, grunt-perfbudget will now test your site against the default
53
53
54
54
grunt-perfbudget takes the following options:
55
55
56
+
#### options.output
57
+
58
+
Type `String`
59
+
Default value: NONE
60
+
61
+
The file to output the JSON results to.
62
+
56
63
#### options.url
57
64
58
65
Type `String`
59
-
Default value: NONE
66
+
Default value: NONE
60
67
61
68
The url you want to perform the tests on.
62
69
63
70
#### options.key
64
71
65
72
Type `String`
66
-
Default value: NONE
73
+
Default value: NONE
67
74
68
75
The API Key for the public instance of WPT. *Not needed if using a private instance of webpagetest*
69
76
70
77
#### options.location
71
78
72
79
Type `String`
73
-
Default value: 'Dulles_Nexus5'
80
+
Default value: 'Dulles_Nexus5'
74
81
75
82
The default WPT location/device to conduct the test using.
76
83
77
84
#### options.wptInstance
78
85
79
86
Type `String`
80
-
Default value: 'www.webpagetest.org'
87
+
Default value: 'www.webpagetest.org'
81
88
82
89
The WPT instance to conduct the tests with.
83
90
@@ -133,7 +140,7 @@ The package loss rate (percentage of packets to drop). *Used when connectivity i
133
140
#### options.repeatView
134
141
135
142
Type `Boolean`
136
-
Default value: `false`
143
+
Default value: `false`
137
144
138
145
If set to `true`, tests the budget against the repeat view. *By default, perfbudget tests the budget against the first view and doesn't ask WPT to run a test on the repeat view.*
139
146
@@ -334,6 +341,20 @@ perfbudget: {
334
341
}
335
342
```
336
343
344
+
#### 5. Test http://google.com against default budget settings and output the results to a file.
345
+
346
+
```javascript
347
+
perfbudget: {
348
+
default: {
349
+
options: {
350
+
url:'http://google.com',
351
+
key:'API_KEY_HERE',
352
+
output:'wpt-results.json'
353
+
}
354
+
}
355
+
}
356
+
```
357
+
337
358
## Contributing
338
359
In lieu of a formal styleguide, take care to maintain the existing coding style. Add unit tests for any new or changed functionality. Lint and test your code using [Grunt](http://gruntjs.com/).
0 commit comments