You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
22 lines
471 B
22 lines
471 B
/**
|
|
* Resolve flags which deal with compilation stats
|
|
* @param {args} args - Parsed args passed to CLI
|
|
*/
|
|
const resolveStats = (args) => {
|
|
const { stats, json } = args;
|
|
|
|
const finalOptions = {
|
|
options: {},
|
|
outputOptions: {},
|
|
};
|
|
|
|
if (stats !== undefined) {
|
|
finalOptions.options.stats = stats;
|
|
}
|
|
if (json) {
|
|
finalOptions.outputOptions.json = json;
|
|
}
|
|
return finalOptions;
|
|
};
|
|
|
|
module.exports = resolveStats;
|
|
|