mirror of
https://github.com/Rushilwiz/spaceout.git
synced 2025-04-22 12:29:50 -04:00
23 lines
471 B
JavaScript
23 lines
471 B
JavaScript
/**
|
|
* 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;
|