Skip to content

Commit 6b2018e

Browse files
authored
Update index.js
1 parent 7344ca9 commit 6b2018e

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

lib/index.js

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ export default class JavascriptPlugin extends SitespeedioPlugin {
2222
const libFolder = fileURLToPath(new URL('..', import.meta.url));
2323
this.pluginFolder = path.resolve(libFolder);
2424
this.options = options;
25+
this.log = context.log;
2526

2627
this.pug = await fsp.readFile(
2728
path.resolve(this.pluginFolder, 'pug', 'index.pug'),
@@ -111,6 +112,10 @@ export default class JavascriptPlugin extends SitespeedioPlugin {
111112
super.sendMessage(pluginname + '.summary', summary.groups[group], {
112113
group
113114
});
115+
116+
if (this.options.javascript && this.options.javascript.terminal && this.options.javascript.terminal.showresults) {
117+
this.log.info('plugin-javascript', group, JSON.stringify(summary.groups[group], false, ' '));
118+
}
114119
}
115120
break;
116121
}
@@ -119,4 +124,4 @@ export default class JavascriptPlugin extends SitespeedioPlugin {
119124
// close(options, errors) {
120125
// // Cleanup if necessary
121126
// }
122-
}
127+
}

0 commit comments

Comments
 (0)