File tree 2 files changed +50
-2
lines changed
2 files changed +50
-2
lines changed Original file line number Diff line number Diff line change
1
+ const throttling = {
2
+ disabled : {
3
+ rttMs : 0 ,
4
+ throughputKbps : 0 ,
5
+ requestLatencyMs : 0 ,
6
+ downloadThroughputKbps : 0 ,
7
+ uploadThroughputKbps : 0 ,
8
+ cpuSlowdownMultiplier : 0 ,
9
+ }
10
+ } ;
11
+
12
+ module . exports = {
13
+ settings : {
14
+ output : 'json' ,
15
+ maxWaitForLoad : 45 * 1000 ,
16
+ throttlingMethod : 'provided' ,
17
+ throttling : throttling . disabled ,
18
+ auditMode : false ,
19
+ gatherMode : false ,
20
+ disableStorageReset : false ,
21
+ disableDeviceEmulation : true ,
22
+ emulatedFormFactor : 'none' ,
23
+ blockedUrlPatterns : null ,
24
+ additionalTraceCategories : null ,
25
+ extraHeaders : null ,
26
+ onlyAudits : null ,
27
+ onlyCategories : null ,
28
+ skipAudits : null ,
29
+ } ,
30
+ passes : [
31
+ {
32
+ passName : 'defaultPass' ,
33
+ recordTrace : true ,
34
+ useThrottling : false ,
35
+ pauseAfterLoadMs : 1000 ,
36
+ networkQuietThresholdMs : 1000 ,
37
+ cpuQuietThresholdMs : 1000 ,
38
+ gatherers : [ ] ,
39
+ } ,
40
+ ] ,
41
+ audits : [
42
+ 'time-to-first-byte' ,
43
+ 'metrics/first-meaningful-paint' ,
44
+ 'metrics/interactive' ,
45
+ ] ,
46
+ } ;
Original file line number Diff line number Diff line change 52
52
"karma-sourcemap-loader" : " 0.3.7" ,
53
53
"karma-verbose-reporter" : " 0.0.6" ,
54
54
"karma-webpack" : " ^2.0.4" ,
55
+ "lighthouse" : " ^4.0.0-alpha.2-3.2.1" ,
55
56
"load-grunt-config" : " ^0.19.2" ,
56
57
"lodash-webpack-plugin" : " ^0.11.2" ,
57
58
"npx" : " ^10.2.0" ,
62
63
"webpack-merge" : " ^4.1.2"
63
64
},
64
65
"scripts" : {
65
- "build" : " webpack --config webpack.prod.js" ,
66
- "buildDev" : " webpack --config webpack.dev.js"
66
+ "build" : " npx webpack --config webpack.prod.js" ,
67
+ "buildDev" : " npx webpack --config webpack.dev.js" ,
68
+ "lighthouse" : " npx lighthouse --config-path=lighthouse-config.js --quiet --output json --chrome-flags=\" --headless\" $URL | jq '.audits | map_values(.rawValue)'"
67
69
}
68
70
}
You can’t perform that action at this time.
0 commit comments