Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Output the budget result as JSON #2299

merged 6 commits into from Feb 8, 2019
Diff settings


Just for now


Output the budget result as JSON

  • Loading branch information...
soulgalore committed Feb 8, 2019
commit 2bb274644c18479f7918f583f2f372256fe440fe
Copy path View file
@@ -612,7 +612,7 @@ module.exports.parseCommandLine = function parseCommandLine() {
group: 'Budget'
.option('budget.output', {
choices: ['junit', 'tap'],
choices: ['junit', 'tap', 'json'],
describe: 'The output format of the budget.',
group: 'Budget'
Copy path View file
@@ -4,6 +4,7 @@ const deprecatedVerify = require('./deprecatedVerify').verify;
const verify = require('./verify').verify;
const tap = require('./tap');
const junit = require('./junit');
const json = require('./json');
const log = require('intel').getLogger('sitespeedio.plugin.budget');

module.exports = {
@@ -47,7 +48,9 @@ module.exports = {

case 'sitespeedio.render': {
if (this.options.budget) {
if (this.options.budget.output === 'tap') {
if (this.options.budget.output === 'json') {
json.writeJson(this.result, this.storageManager.getBaseDir());
} else if (this.options.budget.output === 'tap') {
tap.writeTap(this.result, this.storageManager.getBaseDir());
} else if (this.options.budget.output === 'junit') {
junit.writeJunit(this.result, this.storageManager.getBaseDir());
ProTip! Use n and p to navigate between commits in a pull request.
You can’t perform that action at this time.