budget json
This commit is contained in:
parent
76526b3e7b
commit
99972f31d8
|
|
@ -204,3 +204,13 @@ docker run --rm -v "$(pwd)":/sitespeed.io sitespeedio/sitespeed.io:{% include ve
|
|||
~~~
|
||||
|
||||
It will create a *budget.tap* in the outputFolder.
|
||||
|
||||
### JSON
|
||||
You can output the result of the budget as JSON:
|
||||
|
||||
~~~bash
|
||||
docker run --rm -v "$(pwd)":/sitespeed.io sitespeedio/sitespeed.io:{% include version/sitespeed.io.txt %} https://www.sitespeed.io/ --budget.configPath myBudget.json --budget.output json -b chrome -n 5
|
||||
~~~
|
||||
|
||||
It will create a *budgetResult.json* in the outputFolder.
|
||||
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@ const fs = require('fs'),
|
|||
path = require('path');
|
||||
|
||||
exports.writeJson = function(results, dir) {
|
||||
const file = path.join(dir, 'budget-result.json');
|
||||
const file = path.join(dir, 'budgetResult.json');
|
||||
log.info('Write budget to %s', path.resolve(file));
|
||||
fs.writeFileSync(file, JSON.stringify(results, null, 2));
|
||||
};
|
||||
|
|
|
|||
Loading…
Reference in New Issue